@sentry/junior 0.127.0 → 0.128.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 (112) hide show
  1. package/dist/{agent-hooks-HMCMFIIO.js → agent-hooks-F75ANGBV.js} +9 -9
  2. package/dist/api.js +23 -22
  3. package/dist/app.js +281 -138
  4. package/dist/{catalog-runtime-MI5UNBZ7.js → catalog-runtime-ZPSA5QM2.js} +6 -6
  5. package/dist/chat/agent-dispatch/context.d.ts +17 -0
  6. package/dist/chat/agent-dispatch/store.d.ts +1 -1
  7. package/dist/chat/agent-dispatch/work.d.ts +1 -1
  8. package/dist/chat/credentials/context.d.ts +27 -0
  9. package/dist/chat/credentials/subject.d.ts +15 -0
  10. package/dist/chat/event-tasks/ingest.d.ts +9 -0
  11. package/dist/chat/event-tasks/store.d.ts +15 -0
  12. package/dist/chat/event-tasks/tool-support.d.ts +140 -0
  13. package/dist/chat/event-tasks/types.d.ts +44 -0
  14. package/dist/chat/plugins/viewer.d.ts +16 -0
  15. package/dist/chat/resource-events/ingest.d.ts +1 -0
  16. package/dist/chat/resource-events/store.d.ts +2 -0
  17. package/dist/chat/resource-events/workspace.d.ts +4 -0
  18. package/dist/chat/sandbox/command-result.d.ts +3 -22
  19. package/dist/chat/sandbox/egress/schemas.d.ts +11 -0
  20. package/dist/chat/services/guardian-action-policy.d.ts +1 -1
  21. package/dist/chat/slack/dispatch-turn.d.ts +1 -1
  22. package/dist/chat/slack/tools/canvas/create.d.ts +0 -16
  23. package/dist/chat/slack/tools/canvas/edit.d.ts +0 -16
  24. package/dist/chat/slack/tools/canvas/read.d.ts +0 -16
  25. package/dist/chat/slack/tools/canvas/write.d.ts +0 -16
  26. package/dist/chat/slack/tools/channel-list-messages.d.ts +0 -16
  27. package/dist/chat/slack/tools/conversation-search.d.ts +0 -16
  28. package/dist/chat/slack/tools/list/add-items.d.ts +0 -16
  29. package/dist/chat/slack/tools/list/create.d.ts +0 -16
  30. package/dist/chat/slack/tools/list/get-items.d.ts +0 -16
  31. package/dist/chat/slack/tools/list/update-item.d.ts +0 -16
  32. package/dist/chat/slack/tools/message-add-reaction.d.ts +0 -16
  33. package/dist/chat/slack/tools/public-search.d.ts +0 -16
  34. package/dist/chat/slack/tools/send-files.d.ts +10 -28
  35. package/dist/chat/slack/tools/thread-read.d.ts +0 -16
  36. package/dist/chat/slack/tools/user-lookup.d.ts +0 -16
  37. package/dist/chat/tool-support/action-review.d.ts +1 -1
  38. package/dist/chat/tool-support/structured-result.d.ts +17 -46
  39. package/dist/chat/tool-support/text-range-result.d.ts +8 -32
  40. package/dist/chat/tool-support/zod-tool.d.ts +6 -7
  41. package/dist/chat/tools/create-event-task.d.ts +65 -0
  42. package/dist/chat/tools/definition.d.ts +4 -0
  43. package/dist/chat/tools/delete-event-task.d.ts +57 -0
  44. package/dist/chat/tools/event-tasks.d.ts +5 -0
  45. package/dist/chat/tools/handoff/tool.d.ts +0 -16
  46. package/dist/chat/tools/list-event-tasks.d.ts +55 -0
  47. package/dist/chat/tools/list-resource-event-subscriptions.d.ts +0 -38
  48. package/dist/chat/tools/query-conversation-events.d.ts +0 -16
  49. package/dist/chat/tools/runtime/report-progress.d.ts +0 -16
  50. package/dist/chat/tools/sandbox/edit-file.d.ts +0 -23
  51. package/dist/chat/tools/sandbox/file-utils.d.ts +2 -17
  52. package/dist/chat/tools/sandbox/find-files.d.ts +5 -8
  53. package/dist/chat/tools/sandbox/grep.d.ts +1 -4
  54. package/dist/chat/tools/sandbox/list-dir.d.ts +1 -4
  55. package/dist/chat/tools/search-resource-event-types.d.ts +0 -16
  56. package/dist/chat/tools/search-tools.d.ts +0 -16
  57. package/dist/chat/tools/skill/load-skill.d.ts +0 -20
  58. package/dist/chat/tools/skill/search-mcp-tools.d.ts +0 -16
  59. package/dist/chat/tools/stop-watching-resources.d.ts +0 -22
  60. package/dist/chat/tools/system-time.d.ts +0 -16
  61. package/dist/chat/tools/types.d.ts +8 -4
  62. package/dist/chat/tools/update-event-task.d.ts +66 -0
  63. package/dist/chat/tools/watch-resource-events.d.ts +0 -46
  64. package/dist/chat/tools/web/fetch-content.d.ts +0 -2
  65. package/dist/chat/tools/web/fetch-tool.d.ts +0 -16
  66. package/dist/chat/tools/web/image-generate.d.ts +0 -16
  67. package/dist/chat/tools/web/search.d.ts +0 -16
  68. package/dist/{chunk-YSOZT72W.js → chunk-2HTHX6XV.js} +4 -4
  69. package/dist/{chunk-NYVMPADK.js → chunk-3PKF6YNU.js} +1 -1
  70. package/dist/{chunk-UEMGGJZD.js → chunk-5KKIBIIP.js} +12 -12
  71. package/dist/{chunk-W3U3YQYI.js → chunk-77VDLF3Z.js} +18 -1
  72. package/dist/{chunk-TLMI3Q4Q.js → chunk-A76LKS5W.js} +199 -94
  73. package/dist/{chunk-AYICPT5T.js → chunk-B6E3YA2H.js} +1 -1
  74. package/dist/{chunk-PDG3BSOD.js → chunk-B7FPRGUJ.js} +3 -3
  75. package/dist/{chunk-JNYR4G7A.js → chunk-BY43CEXN.js} +2 -2
  76. package/dist/{chunk-HDSDCEPK.js → chunk-EPBBYMNE.js} +1 -1
  77. package/dist/{chunk-VHUMNUJL.js → chunk-FJEIX3AH.js} +2 -2
  78. package/dist/{chunk-SH7HDO2D.js → chunk-G6XQODHM.js} +1 -1
  79. package/dist/{chunk-WXP2ZXC7.js → chunk-HBFQLSGV.js} +4 -4
  80. package/dist/{chunk-C7AVHH3H.js → chunk-JDCPDJ54.js} +2 -2
  81. package/dist/{chunk-L7L7RYJM.js → chunk-K5ZB3WWH.js} +2 -2
  82. package/dist/{chunk-4H2NZPFJ.js → chunk-KNRODVH2.js} +6 -6
  83. package/dist/{chunk-JXQWTNDI.js → chunk-KTGJAWRO.js} +1 -1
  84. package/dist/{chunk-6DU2ZNF7.js → chunk-NHWE6Y7G.js} +7 -7
  85. package/dist/{chunk-FVIU6NQO.js → chunk-OLGB5Y7R.js} +2 -2
  86. package/dist/{chunk-2M6LYDTB.js → chunk-PBWUUVVG.js} +1 -1
  87. package/dist/{chunk-AKL3BAYJ.js → chunk-RYWMDDWK.js} +1 -1
  88. package/dist/{chunk-S4PUICSB.js → chunk-SHMHHXD5.js} +34 -5
  89. package/dist/{chunk-2N6EL22B.js → chunk-WZ365SQC.js} +1 -1
  90. package/dist/{chunk-Z5LLJNTL.js → chunk-YY6CVET7.js} +1116 -1083
  91. package/dist/{chunk-NK7QVIMJ.js → chunk-Z4KTQMWW.js} +1 -1
  92. package/dist/cli/chat.js +27 -27
  93. package/dist/cli/check.js +7 -7
  94. package/dist/cli/plugins.js +13 -13
  95. package/dist/cli/snapshot-create.js +10 -10
  96. package/dist/cli/upgrade.js +8 -8
  97. package/dist/db/schema/event-tasks.d.ts +161 -0
  98. package/dist/db/schema.d.ts +163 -1
  99. package/dist/{db-N4EY57ZJ.js → db-FYJYPAKG.js} +7 -7
  100. package/dist/instrumentation.js +4 -4
  101. package/dist/nitro.js +2 -2
  102. package/dist/{oauth-callback-server-O62UOQSS.js → oauth-callback-server-W3PPIHCS.js} +18 -18
  103. package/dist/{runner-SRHRD3NX.js → runner-5NOFUYKR.js} +11 -11
  104. package/dist/{sandbox-egress-signals-CDFAP67O.js → sandbox-egress-signals-A5HWIQH4.js} +2 -2
  105. package/dist/{skills-V6X3JVVA.js → skills-ENIBKF5V.js} +7 -7
  106. package/dist/{validation-ZZXZELGH.js → validation-BHLBOO6K.js} +7 -7
  107. package/dist/version.js +1 -1
  108. package/migrations/0015_magical_ezekiel_stane.sql +11 -0
  109. package/migrations/meta/0015_snapshot.json +1360 -0
  110. package/migrations/meta/_journal.json +7 -0
  111. package/package.json +6 -6
  112. package/dist/chat/plugins/viewer-actors.d.ts +0 -6
@@ -1,9 +1,5 @@
1
1
  import { type Skill, type SkillMetadata } from "@/chat/skills";
2
2
  export type LoadSkillResult = {
3
- ok: boolean;
4
- status: "error" | "success";
5
- error?: string;
6
- available_skills?: string[];
7
3
  skill_name?: string;
8
4
  description?: string;
9
5
  skill_dir?: string;
@@ -26,35 +22,19 @@ export declare function createLoadSkillTool(availableSkills: SkillMetadata[], op
26
22
  };
27
23
  execute?: ((input: unknown, options: import("../definition").ToolExecuteOptions) => {
28
24
  [x: string]: unknown;
29
- ok: boolean;
30
- status: "error" | "success";
31
25
  target?: string | undefined;
32
- data?: unknown;
33
26
  truncated?: boolean | undefined;
34
27
  continuation?: {
35
28
  arguments: Record<string, unknown>;
36
29
  reason?: string | undefined;
37
30
  } | undefined;
38
- error?: string | {
39
- kind: string;
40
- message: string;
41
- retryable?: boolean | undefined;
42
- } | undefined;
43
31
  } | Promise<{
44
32
  [x: string]: unknown;
45
- ok: boolean;
46
- status: "error" | "success";
47
33
  target?: string | undefined;
48
- data?: unknown;
49
34
  truncated?: boolean | undefined;
50
35
  continuation?: {
51
36
  arguments: Record<string, unknown>;
52
37
  reason?: string | undefined;
53
38
  } | undefined;
54
- error?: string | {
55
- kind: string;
56
- message: string;
57
- retryable?: boolean | undefined;
58
- } | undefined;
59
39
  }>) | undefined;
60
40
  };
@@ -21,8 +21,6 @@ export declare function createSearchMcpToolsTool(mcpToolManager: SearchMcpToolMa
21
21
  max_results?: number | undefined;
22
22
  };
23
23
  execute?: ((input: unknown, options: import("../definition").ToolExecuteOptions) => {
24
- ok: boolean;
25
- status: "error" | "success";
26
24
  query: string | null;
27
25
  provider: string | null;
28
26
  total_active_tools: number;
@@ -44,20 +42,12 @@ export declare function createSearchMcpToolsTool(mcpToolManager: SearchMcpToolMa
44
42
  annotations?: Record<string, unknown> | undefined;
45
43
  }[];
46
44
  target?: string | undefined;
47
- data?: unknown;
48
45
  truncated?: boolean | undefined;
49
46
  continuation?: {
50
47
  arguments: Record<string, unknown>;
51
48
  reason?: string | undefined;
52
49
  } | undefined;
53
- error?: string | {
54
- kind: string;
55
- message: string;
56
- retryable?: boolean | undefined;
57
- } | undefined;
58
50
  } | Promise<{
59
- ok: boolean;
60
- status: "error" | "success";
61
51
  query: string | null;
62
52
  provider: string | null;
63
53
  total_active_tools: number;
@@ -79,17 +69,11 @@ export declare function createSearchMcpToolsTool(mcpToolManager: SearchMcpToolMa
79
69
  annotations?: Record<string, unknown> | undefined;
80
70
  }[];
81
71
  target?: string | undefined;
82
- data?: unknown;
83
72
  truncated?: boolean | undefined;
84
73
  continuation?: {
85
74
  arguments: Record<string, unknown>;
86
75
  reason?: string | undefined;
87
76
  } | undefined;
88
- error?: string | {
89
- kind: string;
90
- message: string;
91
- retryable?: boolean | undefined;
92
- } | undefined;
93
77
  }>) | undefined;
94
78
  };
95
79
  export {};
@@ -7,12 +7,6 @@ export declare function createStopWatchingResourcesTool(context: ToolRuntimeCont
7
7
  id?: string | null | undefined;
8
8
  };
9
9
  execute?: ((input: unknown, options: import("./definition").ToolExecuteOptions) => {
10
- ok: true;
11
- status: "success";
12
- data: {
13
- watching_status: "stopped";
14
- stoppedIds: string[];
15
- };
16
10
  watching_status: "stopped";
17
11
  stoppedIds: string[];
18
12
  target?: string | undefined;
@@ -21,18 +15,7 @@ export declare function createStopWatchingResourcesTool(context: ToolRuntimeCont
21
15
  arguments: Record<string, unknown>;
22
16
  reason?: string | undefined;
23
17
  } | undefined;
24
- error?: string | {
25
- kind: string;
26
- message: string;
27
- retryable?: boolean | undefined;
28
- } | undefined;
29
18
  } | Promise<{
30
- ok: true;
31
- status: "success";
32
- data: {
33
- watching_status: "stopped";
34
- stoppedIds: string[];
35
- };
36
19
  watching_status: "stopped";
37
20
  stoppedIds: string[];
38
21
  target?: string | undefined;
@@ -41,10 +24,5 @@ export declare function createStopWatchingResourcesTool(context: ToolRuntimeCont
41
24
  arguments: Record<string, unknown>;
42
25
  reason?: string | undefined;
43
26
  } | undefined;
44
- error?: string | {
45
- kind: string;
46
- message: string;
47
- retryable?: boolean | undefined;
48
- } | undefined;
49
27
  }>) | undefined;
50
28
  };
@@ -4,43 +4,27 @@ export declare function createSystemTimeTool(): Omit<import("./definition").AnyT
4
4
  prepareArguments(args: unknown): Record<string, never>;
5
5
  execute?: ((input: unknown, options: import("./definition").ToolExecuteOptions) => {
6
6
  [x: string]: unknown;
7
- ok: boolean;
8
- status: "error" | "success";
9
7
  unix_ms: number;
10
8
  iso_utc: string;
11
9
  iso_local: string;
12
10
  timezone_offset_minutes: number;
13
11
  target?: string | undefined;
14
- data?: unknown;
15
12
  truncated?: boolean | undefined;
16
13
  continuation?: {
17
14
  arguments: Record<string, unknown>;
18
15
  reason?: string | undefined;
19
16
  } | undefined;
20
- error?: string | {
21
- kind: string;
22
- message: string;
23
- retryable?: boolean | undefined;
24
- } | undefined;
25
17
  } | Promise<{
26
18
  [x: string]: unknown;
27
- ok: boolean;
28
- status: "error" | "success";
29
19
  unix_ms: number;
30
20
  iso_utc: string;
31
21
  iso_local: string;
32
22
  timezone_offset_minutes: number;
33
23
  target?: string | undefined;
34
- data?: unknown;
35
24
  truncated?: boolean | undefined;
36
25
  continuation?: {
37
26
  arguments: Record<string, unknown>;
38
27
  reason?: string | undefined;
39
28
  } | undefined;
40
- error?: string | {
41
- kind: string;
42
- message: string;
43
- retryable?: boolean | undefined;
44
- } | undefined;
45
29
  }>) | undefined;
46
30
  };
@@ -1,12 +1,12 @@
1
1
  import type { FileUpload } from "chat";
2
- import type { Destination, LocalDestination, LocalSource, PluginEgress, SlackDestination, SlackSource, Source } from "@sentry/junior-plugin-api";
2
+ import type { Destination, Identity, LocalDestination, LocalSource, PluginEgress, SlackDestination, SlackSource, Source, User } from "@sentry/junior-plugin-api";
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/state/turn-session";
6
6
  import type { ThreadArtifactsState } from "@/chat/state/artifacts";
7
7
  import type { Skill } from "@/chat/skills";
8
8
  import type { LoadSkillMetadata } from "@/chat/tools/skill/load-skill";
9
- import type { JuniorToolResult } from "@/chat/tool-support/structured-result";
9
+ import type { JuniorToolOutput } from "@/chat/tool-support/structured-result";
10
10
  import type { LocalActor, Actor, SlackActor } from "@/chat/actor";
11
11
  import type { SlackActionToken } from "@/chat/slack/action-token";
12
12
  import type { ModelProfile } from "@/chat/model-profile";
@@ -26,13 +26,13 @@ export interface WebFetchToolDeps {
26
26
  execute?: (input: {
27
27
  url: string;
28
28
  max_chars?: number;
29
- }) => Promise<JuniorToolResult> | JuniorToolResult;
29
+ }) => Promise<JuniorToolOutput> | JuniorToolOutput;
30
30
  }
31
31
  export interface WebSearchToolDeps {
32
32
  execute?: (input: {
33
33
  query: string;
34
34
  max_results?: number;
35
- }) => Promise<JuniorToolResult> | JuniorToolResult;
35
+ }) => Promise<JuniorToolOutput> | JuniorToolOutput;
36
36
  }
37
37
  /** Optional host image reader for deterministic tool execution without sandbox I/O. */
38
38
  export interface ViewImageToolDeps {
@@ -65,6 +65,10 @@ interface BaseToolRuntimeContext {
65
65
  /** Runtime-owned default outbound destination for this invocation. */
66
66
  destination: Destination;
67
67
  actor?: Actor;
68
+ resolveActorIdentity?: () => Promise<{
69
+ identity: Identity;
70
+ user?: User;
71
+ } | undefined>;
68
72
  /** Runtime-owned source where this invocation came from. */
69
73
  source: Source;
70
74
  /** Runtime surface that owns final delivery semantics for this turn. */
@@ -0,0 +1,66 @@
1
+ import { type ResourceEventCatalog } from "@/chat/resource-events/catalog";
2
+ import type { ToolRuntimeContext } from "@/chat/tools/types";
3
+ /** Create the core tool that updates an event task in this destination. */
4
+ export declare function createUpdateEventTaskTool(context: ToolRuntimeContext, catalog: ResourceEventCatalog): Omit<import("./definition").AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
5
+ inputSchema: import("./definition").JsonSchemaObject;
6
+ outputSchema: import("./definition").JsonSchemaObject;
7
+ prepareArguments(args: unknown): {
8
+ taskId: string;
9
+ task?: string | null | undefined;
10
+ trigger?: {
11
+ namespace: string;
12
+ identifier: string;
13
+ resourceType: string;
14
+ label: string;
15
+ events: string[];
16
+ } | null | undefined;
17
+ credentialMode?: "system" | "creator" | null | undefined;
18
+ };
19
+ execute?: ((input: unknown, options: import("./definition").ToolExecuteOptions) => {
20
+ task: {
21
+ id: string;
22
+ task: string;
23
+ namespace: string;
24
+ identifier: string;
25
+ resourceType: string;
26
+ label: string;
27
+ events: string[];
28
+ credentialMode: "system" | "creator";
29
+ createdBy: {
30
+ slackUserId: string;
31
+ fullName?: string | undefined;
32
+ userName?: string | undefined;
33
+ };
34
+ triggerAvailable: boolean;
35
+ };
36
+ target?: string | undefined;
37
+ truncated?: boolean | undefined;
38
+ continuation?: {
39
+ arguments: Record<string, unknown>;
40
+ reason?: string | undefined;
41
+ } | undefined;
42
+ } | Promise<{
43
+ task: {
44
+ id: string;
45
+ task: string;
46
+ namespace: string;
47
+ identifier: string;
48
+ resourceType: string;
49
+ label: string;
50
+ events: string[];
51
+ credentialMode: "system" | "creator";
52
+ createdBy: {
53
+ slackUserId: string;
54
+ fullName?: string | undefined;
55
+ userName?: string | undefined;
56
+ };
57
+ triggerAvailable: boolean;
58
+ };
59
+ target?: string | undefined;
60
+ truncated?: boolean | undefined;
61
+ continuation?: {
62
+ arguments: Record<string, unknown>;
63
+ reason?: string | undefined;
64
+ } | undefined;
65
+ }>) | undefined;
66
+ };
@@ -14,24 +14,6 @@ export declare function createWatchResourceEventsTool(context: ToolRuntimeContex
14
14
  ttlMs?: number | undefined;
15
15
  };
16
16
  execute?: ((input: unknown, options: import("./definition").ToolExecuteOptions) => {
17
- ok: true;
18
- status: "success";
19
- data: {
20
- id: string;
21
- subscription_status: "cancelled" | "completed" | "active";
22
- identifier: string;
23
- events: string[];
24
- expiresAtMs: number;
25
- stop_watching: {
26
- execution_tool: "executeTool";
27
- execution_example: {
28
- tool_name: "stopWatchingResources";
29
- arguments: {
30
- id: string;
31
- };
32
- };
33
- };
34
- };
35
17
  id: string;
36
18
  subscription_status: "cancelled" | "completed" | "active";
37
19
  identifier: string;
@@ -52,30 +34,7 @@ export declare function createWatchResourceEventsTool(context: ToolRuntimeContex
52
34
  arguments: Record<string, unknown>;
53
35
  reason?: string | undefined;
54
36
  } | undefined;
55
- error?: string | {
56
- kind: string;
57
- message: string;
58
- retryable?: boolean | undefined;
59
- } | undefined;
60
37
  } | Promise<{
61
- ok: true;
62
- status: "success";
63
- data: {
64
- id: string;
65
- subscription_status: "cancelled" | "completed" | "active";
66
- identifier: string;
67
- events: string[];
68
- expiresAtMs: number;
69
- stop_watching: {
70
- execution_tool: "executeTool";
71
- execution_example: {
72
- tool_name: "stopWatchingResources";
73
- arguments: {
74
- id: string;
75
- };
76
- };
77
- };
78
- };
79
38
  id: string;
80
39
  subscription_status: "cancelled" | "completed" | "active";
81
40
  identifier: string;
@@ -96,10 +55,5 @@ export declare function createWatchResourceEventsTool(context: ToolRuntimeContex
96
55
  arguments: Record<string, unknown>;
97
56
  reason?: string | undefined;
98
57
  } | undefined;
99
- error?: string | {
100
- kind: string;
101
- message: string;
102
- retryable?: boolean | undefined;
103
- } | undefined;
104
58
  }>) | undefined;
105
59
  };
@@ -7,8 +7,6 @@ export interface WebFetchResponseContent {
7
7
  extractedChars: number;
8
8
  }
9
9
  export type WebFetchResponse = {
10
- ok: true;
11
- status: "success";
12
10
  url: string;
13
11
  content: string;
14
12
  title?: string;
@@ -11,35 +11,19 @@ export declare function createWebFetchTool(hooks: ToolHooks, options?: {
11
11
  };
12
12
  execute?: ((input: unknown, options: import("../definition").ToolExecuteOptions) => {
13
13
  [x: string]: unknown;
14
- ok: boolean;
15
- status: "error" | "success";
16
14
  target?: string | undefined;
17
- data?: unknown;
18
15
  truncated?: boolean | undefined;
19
16
  continuation?: {
20
17
  arguments: Record<string, unknown>;
21
18
  reason?: string | undefined;
22
19
  } | undefined;
23
- error?: string | {
24
- kind: string;
25
- message: string;
26
- retryable?: boolean | undefined;
27
- } | undefined;
28
20
  } | Promise<{
29
21
  [x: string]: unknown;
30
- ok: boolean;
31
- status: "error" | "success";
32
22
  target?: string | undefined;
33
- data?: unknown;
34
23
  truncated?: boolean | undefined;
35
24
  continuation?: {
36
25
  arguments: Record<string, unknown>;
37
26
  reason?: string | undefined;
38
27
  } | undefined;
39
- error?: string | {
40
- kind: string;
41
- message: string;
42
- retryable?: boolean | undefined;
43
- } | undefined;
44
28
  }>) | undefined;
45
29
  };
@@ -10,8 +10,6 @@ export declare function createImageGenerateTool(hooks: Required<Pick<ToolHooks,
10
10
  prompt: string;
11
11
  };
12
12
  execute?: ((input: unknown, options: import("../definition").ToolExecuteOptions) => {
13
- ok: boolean;
14
- status: "error" | "success";
15
13
  model: string;
16
14
  prompt: string;
17
15
  enrichedPrompt: string;
@@ -24,20 +22,12 @@ export declare function createImageGenerateTool(hooks: Required<Pick<ToolHooks,
24
22
  }[];
25
23
  delivery: string;
26
24
  target?: string | undefined;
27
- data?: unknown;
28
25
  truncated?: boolean | undefined;
29
26
  continuation?: {
30
27
  arguments: Record<string, unknown>;
31
28
  reason?: string | undefined;
32
29
  } | undefined;
33
- error?: string | {
34
- kind: string;
35
- message: string;
36
- retryable?: boolean | undefined;
37
- } | undefined;
38
30
  } | Promise<{
39
- ok: boolean;
40
- status: "error" | "success";
41
31
  model: string;
42
32
  prompt: string;
43
33
  enrichedPrompt: string;
@@ -50,16 +40,10 @@ export declare function createImageGenerateTool(hooks: Required<Pick<ToolHooks,
50
40
  }[];
51
41
  delivery: string;
52
42
  target?: string | undefined;
53
- data?: unknown;
54
43
  truncated?: boolean | undefined;
55
44
  continuation?: {
56
45
  arguments: Record<string, unknown>;
57
46
  reason?: string | undefined;
58
47
  } | undefined;
59
- error?: string | {
60
- kind: string;
61
- message: string;
62
- retryable?: boolean | undefined;
63
- } | undefined;
64
48
  }>) | undefined;
65
49
  };
@@ -8,35 +8,19 @@ export declare function createWebSearchTool(modelId: string, override?: WebSearc
8
8
  };
9
9
  execute?: ((input: unknown, options: import("../definition").ToolExecuteOptions) => {
10
10
  [x: string]: unknown;
11
- ok: boolean;
12
- status: "error" | "success";
13
11
  target?: string | undefined;
14
- data?: unknown;
15
12
  truncated?: boolean | undefined;
16
13
  continuation?: {
17
14
  arguments: Record<string, unknown>;
18
15
  reason?: string | undefined;
19
16
  } | undefined;
20
- error?: string | {
21
- kind: string;
22
- message: string;
23
- retryable?: boolean | undefined;
24
- } | undefined;
25
17
  } | Promise<{
26
18
  [x: string]: unknown;
27
- ok: boolean;
28
- status: "error" | "success";
29
19
  target?: string | undefined;
30
- data?: unknown;
31
20
  truncated?: boolean | undefined;
32
21
  continuation?: {
33
22
  arguments: Record<string, unknown>;
34
23
  reason?: string | undefined;
35
24
  } | undefined;
36
- error?: string | {
37
- kind: string;
38
- message: string;
39
- retryable?: boolean | undefined;
40
- } | undefined;
41
25
  }>) | undefined;
42
26
  };
@@ -2,18 +2,18 @@ import {
2
2
  SANDBOX_WORKSPACE_ROOT,
3
3
  getStateAdapter,
4
4
  sleep
5
- } from "./chunk-SH7HDO2D.js";
5
+ } from "./chunk-G6XQODHM.js";
6
6
  import {
7
7
  toOptionalTrimmed
8
- } from "./chunk-L7L7RYJM.js";
8
+ } from "./chunk-K5ZB3WWH.js";
9
9
  import {
10
10
  pluginCatalogRuntime
11
- } from "./chunk-2N6EL22B.js";
11
+ } from "./chunk-WZ365SQC.js";
12
12
  import {
13
13
  setSpanAttributes,
14
14
  setSpanStatus,
15
15
  withSpan
16
- } from "./chunk-AYICPT5T.js";
16
+ } from "./chunk-B6E3YA2H.js";
17
17
 
18
18
  // src/chat/sandbox/snapshot/profile.ts
19
19
  import { createHash } from "crypto";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pluginCatalogRuntime
3
- } from "./chunk-2N6EL22B.js";
3
+ } from "./chunk-WZ365SQC.js";
4
4
 
5
5
  // src/chat/plugins/validation.ts
6
6
  import { isDeepStrictEqual } from "util";
@@ -13,7 +13,7 @@ import {
13
13
  persistAuthPauseTurnState,
14
14
  requireTurnFailureEventId,
15
15
  scheduleSessionCompletedPluginTasks
16
- } from "./chunk-4H2NZPFJ.js";
16
+ } from "./chunk-KNRODVH2.js";
17
17
  import {
18
18
  buildSentryConversationUrl
19
19
  } from "./chunk-4CODA7P5.js";
@@ -40,7 +40,7 @@ import {
40
40
  resolveBaseUrl,
41
41
  resolvePluginOAuthAccount,
42
42
  truncateStatusText
43
- } from "./chunk-6DU2ZNF7.js";
43
+ } from "./chunk-NHWE6Y7G.js";
44
44
  import {
45
45
  JUNIOR_THREAD_STATE_TTL_MS,
46
46
  TurnSliceLimitExceededError,
@@ -73,13 +73,13 @@ import {
73
73
  recordDeliveredAssistantMessage,
74
74
  turnHasReply,
75
75
  updateConversationStats
76
- } from "./chunk-WXP2ZXC7.js";
76
+ } from "./chunk-HBFQLSGV.js";
77
77
  import {
78
78
  parseSlackThreadId,
79
79
  readSlackRawMessageContext,
80
80
  resolveSlackChannelIdFromMessage,
81
81
  resolveSlackChannelIdFromThreadId
82
- } from "./chunk-2M6LYDTB.js";
82
+ } from "./chunk-PBWUUVVG.js";
83
83
  import {
84
84
  SlackActionError,
85
85
  getDashboardConversationLink,
@@ -88,19 +88,19 @@ import {
88
88
  getSlackClient,
89
89
  isDmChannel,
90
90
  normalizeSlackConversationId
91
- } from "./chunk-TLMI3Q4Q.js";
91
+ } from "./chunk-A76LKS5W.js";
92
92
  import {
93
93
  getConversationEventStore,
94
94
  getConversationStore,
95
95
  parseDestination,
96
96
  requireSlackDestination,
97
97
  sameDestination
98
- } from "./chunk-PDG3BSOD.js";
98
+ } from "./chunk-B7FPRGUJ.js";
99
99
  import {
100
100
  acquireActiveLock,
101
101
  getDefaultRedisStateAdapterFor,
102
102
  getStateAdapter
103
- } from "./chunk-SH7HDO2D.js";
103
+ } from "./chunk-G6XQODHM.js";
104
104
  import {
105
105
  FUNCTION_TIMEOUT_BUFFER_SECONDS,
106
106
  botConfig,
@@ -109,18 +109,18 @@ import {
109
109
  getRuntimeMetadata,
110
110
  normalizeSlackEmojiName,
111
111
  standardModelId
112
- } from "./chunk-L7L7RYJM.js";
112
+ } from "./chunk-K5ZB3WWH.js";
113
113
  import {
114
114
  discoverSkills
115
- } from "./chunk-JNYR4G7A.js";
115
+ } from "./chunk-BY43CEXN.js";
116
116
  import {
117
117
  pluginCatalogRuntime
118
- } from "./chunk-2N6EL22B.js";
118
+ } from "./chunk-WZ365SQC.js";
119
119
  import {
120
120
  buildOAuthTokenRequest,
121
121
  hasRequiredOAuthScope,
122
122
  parseOAuthTokenResponse
123
- } from "./chunk-FVIU6NQO.js";
123
+ } from "./chunk-OLGB5Y7R.js";
124
124
  import {
125
125
  createSlackResumeActor,
126
126
  isUserActor,
@@ -139,7 +139,7 @@ import {
139
139
  toOptionalNumber,
140
140
  toOptionalString,
141
141
  withLogContext
142
- } from "./chunk-AYICPT5T.js";
142
+ } from "./chunk-B6E3YA2H.js";
143
143
  import {
144
144
  homeDir
145
145
  } from "./chunk-H4HBKISO.js";
@@ -18,9 +18,16 @@ var scheduledTaskCredentialSubjectBindingSchema = z.object({
18
18
  taskId: exactNonBlankStringSchema,
19
19
  signature: z.string().min(1)
20
20
  }).strict();
21
+ var eventTaskCredentialSubjectBindingSchema = z.object({
22
+ type: z.literal("event-task"),
23
+ plugin: z.string().min(1),
24
+ taskId: exactNonBlankStringSchema,
25
+ signature: z.string().min(1)
26
+ }).strict();
21
27
  var credentialSubjectBindingSchema = z.discriminatedUnion("type", [
22
28
  slackDirectCredentialSubjectBindingSchema,
23
- scheduledTaskCredentialSubjectBindingSchema
29
+ scheduledTaskCredentialSubjectBindingSchema,
30
+ eventTaskCredentialSubjectBindingSchema
24
31
  ]);
25
32
  var credentialUserActorSchema = z.object({
26
33
  type: z.literal("user"),
@@ -46,6 +53,16 @@ var credentialSubjectSchema = z.discriminatedUnion("allowedWhen", [
46
53
  }).strict().refine((subject) => subject.binding.taskId === subject.taskId, {
47
54
  message: "Scheduled task credential subject requires task binding",
48
55
  path: ["binding"]
56
+ }),
57
+ z.object({
58
+ type: z.literal("user"),
59
+ userId: exactActorIdSchema,
60
+ allowedWhen: z.literal("event-task"),
61
+ taskId: exactNonBlankStringSchema,
62
+ binding: eventTaskCredentialSubjectBindingSchema
63
+ }).strict().refine((subject) => subject.binding.taskId === subject.taskId, {
64
+ message: "Event task credential subject requires task binding",
65
+ path: ["binding"]
49
66
  })
50
67
  ]);
51
68
  var credentialContextSchema = z.union([