@sentry/junior 0.146.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.
- package/dist/{agent-hooks-SLJADYE5.js → agent-hooks-HS6VGUPM.js} +10 -10
- package/dist/api/conversations/detail.d.ts +1 -0
- package/dist/api/conversations/event-list.d.ts +1 -0
- package/dist/api/schema/conversation.d.ts +4 -0
- package/dist/api/schema.js +1 -1
- package/dist/api.js +26 -22
- package/dist/app.js +220 -238
- package/dist/{catalog-runtime-RQIMSDPR.js → catalog-runtime-M6ZTPYRV.js} +5 -5
- package/dist/chat/agent/prompt.d.ts +0 -2
- package/dist/chat/agent/request.d.ts +2 -5
- package/dist/chat/agent/sandbox.d.ts +2 -2
- package/dist/chat/agent/tools.d.ts +0 -2
- package/dist/chat/agent-dispatch/types.d.ts +2 -2
- package/dist/chat/capabilities/jr-rpc-command.d.ts +2 -2
- package/dist/chat/configuration/service.d.ts +5 -2
- package/dist/chat/configuration/sql.d.ts +9 -0
- package/dist/chat/configuration/types.d.ts +17 -13
- package/dist/chat/conversations/history.d.ts +3 -0
- package/dist/chat/conversations/projection.d.ts +10 -0
- package/dist/chat/credentials/unlink-provider.d.ts +2 -1
- package/dist/chat/credentials/user-token-store.d.ts +2 -0
- package/dist/chat/event-tasks/tool-support.d.ts +2 -0
- package/dist/chat/identities/sql.d.ts +8 -0
- package/dist/chat/logging.d.ts +2 -0
- package/dist/chat/mcp/auth-store.d.ts +0 -2
- package/dist/chat/mcp/oauth.d.ts +0 -2
- package/dist/chat/oauth-flow.d.ts +3 -1
- package/dist/chat/pi/client.d.ts +2 -0
- package/dist/chat/plugins/credential-hooks.d.ts +2 -0
- package/dist/chat/prompt.d.ts +0 -2
- package/dist/chat/resource-events/notification.d.ts +2 -1
- package/dist/chat/runtime/delivered-turn-state.d.ts +1 -4
- package/dist/chat/runtime/thread-state.d.ts +8 -11
- package/dist/chat/runtime/turn-input.d.ts +4 -2
- package/dist/chat/runtime/turn-preparation.d.ts +2 -4
- package/dist/chat/sandbox/command-result.d.ts +2 -0
- package/dist/chat/sandbox/egress/schemas.d.ts +6 -0
- package/dist/chat/scheduled-tasks/tool-support.d.ts +2 -0
- package/dist/chat/scheduled-tasks/tools/create.d.ts +2 -0
- package/dist/chat/scheduled-tasks/tools/delete.d.ts +2 -0
- package/dist/chat/scheduled-tasks/tools/list.d.ts +2 -0
- package/dist/chat/scheduled-tasks/tools/run-now.d.ts +2 -0
- package/dist/chat/scheduled-tasks/tools/update.d.ts +2 -0
- package/dist/chat/services/mcp-auth-orchestration.d.ts +0 -3
- package/dist/chat/services/plugin-auth-orchestration.d.ts +2 -1
- package/dist/chat/services/provider-default-config.d.ts +2 -2
- package/dist/chat/services/subscribed-decision.d.ts +3 -0
- package/dist/chat/services/subscribed-reply-policy.d.ts +1 -0
- package/dist/chat/services/turn-result.d.ts +0 -3
- package/dist/chat/services/turn-router.d.ts +3 -0
- package/dist/chat/slack/assistant-thread/lifecycle.d.ts +0 -1
- package/dist/chat/slack/assistant-thread/title.d.ts +0 -3
- package/dist/chat/slack/dispatch-turn.d.ts +1 -1
- package/dist/chat/slack/tools/canvas/context.d.ts +0 -10
- package/dist/chat/slack/tools/canvas/create.d.ts +2 -0
- package/dist/chat/slack/tools/canvas/edit.d.ts +2 -0
- package/dist/chat/slack/tools/canvas/read.d.ts +2 -0
- package/dist/chat/slack/tools/canvas/write.d.ts +2 -0
- package/dist/chat/slack/tools/channel-list-messages.d.ts +2 -0
- package/dist/chat/slack/tools/conversation-message-search.d.ts +2 -0
- package/dist/chat/slack/tools/list/add-items.d.ts +4 -1
- package/dist/chat/slack/tools/list/api.d.ts +8 -1
- package/dist/chat/slack/tools/list/create.d.ts +2 -0
- package/dist/chat/slack/tools/list/get-items.d.ts +5 -3
- package/dist/chat/slack/tools/list/update-item.d.ts +5 -1
- package/dist/chat/slack/tools/message-add-reaction.d.ts +2 -0
- package/dist/chat/slack/tools/public-search.d.ts +2 -0
- package/dist/chat/slack/tools/send-files.d.ts +2 -0
- package/dist/chat/slack/tools/thread-read.d.ts +2 -0
- package/dist/chat/slack/vision-cache.d.ts +5 -0
- package/dist/chat/state/conversation.d.ts +4 -5
- package/dist/chat/tool-support/structured-result.d.ts +1 -0
- package/dist/chat/tool-support/timed-out-tool-result.d.ts +11 -0
- package/dist/chat/tools/create-event-task.d.ts +2 -0
- package/dist/chat/tools/delete-event-task.d.ts +2 -0
- package/dist/chat/tools/handoff/tool.d.ts +2 -0
- package/dist/chat/tools/list-event-tasks.d.ts +2 -0
- package/dist/chat/tools/list-resource-event-subscriptions.d.ts +2 -0
- package/dist/chat/tools/runtime/report-progress.d.ts +2 -0
- package/dist/chat/tools/runtime/spawn-agent.d.ts +2 -0
- package/dist/chat/tools/search-conversation-events.d.ts +2 -0
- package/dist/chat/tools/search-resource-event-types.d.ts +2 -0
- package/dist/chat/tools/search-tools.d.ts +2 -0
- package/dist/chat/tools/skill/load-skill.d.ts +2 -0
- package/dist/chat/tools/skill/search-mcp-tools.d.ts +2 -0
- package/dist/chat/tools/stop-watching-resources.d.ts +2 -0
- package/dist/chat/tools/system-time.d.ts +2 -0
- package/dist/chat/tools/types.d.ts +0 -6
- package/dist/chat/tools/update-event-task.d.ts +2 -0
- package/dist/chat/tools/user-lookup.d.ts +29 -0
- package/dist/chat/tools/watch-resource-events.d.ts +2 -0
- package/dist/chat/tools/web/fetch-tool.d.ts +2 -0
- package/dist/chat/tools/web/image-generate.d.ts +2 -0
- package/dist/chat/tools/web/search.d.ts +2 -0
- package/dist/{chunk-LVW7BLLT.js → chunk-34GS7B6L.js} +2 -2
- package/dist/{chunk-B63BF443.js → chunk-4LJO56OJ.js} +9 -1
- package/dist/{chunk-H6U2U3EP.js → chunk-6H5SZR24.js} +16 -20
- package/dist/{chunk-M6ZWP4RI.js → chunk-745QJ3ZA.js} +1 -1
- package/dist/{chunk-BLETMLRX.js → chunk-7A4M7PCV.js} +231 -472
- package/dist/{chunk-MKRIZ4VG.js → chunk-7NVJVJID.js} +4 -2
- package/dist/{chunk-ZDGHGY74.js → chunk-7UQIVT6G.js} +13 -6
- package/dist/{chunk-GDQEU4I7.js → chunk-AIOK6LAG.js} +28 -489
- package/dist/{chunk-QSXZ42KX.js → chunk-AVOCH2Z5.js} +3 -3
- package/dist/{chunk-FXDDDSPL.js → chunk-AVZDSUFB.js} +4 -4
- package/dist/{chunk-OFPYOC3M.js → chunk-AYU72WO7.js} +102 -72
- package/dist/chunk-AZ7EAOBE.js +566 -0
- package/dist/{chunk-PH4Q3A6W.js → chunk-CSZINQJ2.js} +1 -1
- package/dist/{chunk-X2WMBTS3.js → chunk-CWP5RHVX.js} +4 -4
- package/dist/{chunk-HQE6EJS5.js → chunk-DLDRQHG5.js} +1 -1
- package/dist/{chunk-MCFIXAV5.js → chunk-DU74WPIC.js} +55 -37
- package/dist/{chunk-X22KCSCO.js → chunk-EFLJ2WJH.js} +6 -4
- package/dist/{chunk-37JJDS4H.js → chunk-GGB4WL5A.js} +1 -1
- package/dist/{chunk-F7REGDKO.js → chunk-IIOOO4FQ.js} +1 -1
- package/dist/{chunk-PB222GIA.js → chunk-JUUKWRBE.js} +1 -1
- package/dist/{chunk-T5GXFFLA.js → chunk-K4SZAP3K.js} +1 -1
- package/dist/{chunk-GYEKOX7N.js → chunk-ORO3PWKQ.js} +1 -1
- package/dist/{chunk-AISNSNDV.js → chunk-PVNG6UMU.js} +3 -3
- package/dist/{chunk-47OSH2ZO.js → chunk-Q4R73I43.js} +365 -206
- package/dist/{chunk-QG7OOKIN.js → chunk-RXBVB2JM.js} +1 -1
- package/dist/{chunk-V6SRLKUB.js → chunk-SGZO7UWH.js} +2 -2
- package/dist/{chunk-JLMVCNXL.js → chunk-SVHUEHUL.js} +1 -0
- package/dist/{chunk-FEKQHPVA.js → chunk-X5UY34KT.js} +6 -5
- package/dist/{chunk-FGHADGIC.js → chunk-YBVXBNSV.js} +2 -2
- package/dist/{chunk-JUA6VU2Z.js → chunk-YEO3VX72.js} +10 -23
- package/dist/{chunk-SCGVWUZX.js → chunk-YHDERDRO.js} +7 -6
- package/dist/{chunk-TCEJ7XXM.js → chunk-YNTTROJT.js} +1 -1
- package/dist/{chunk-37EVZP66.js → chunk-YSB2N563.js} +49 -8
- package/dist/{chunk-W65V465O.js → chunk-Z4YU7Z4L.js} +3 -2
- package/dist/cli/chat.js +32 -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/schema/location-configurations.d.ts +127 -0
- package/dist/db/schema.d.ts +128 -1
- package/dist/{db-WWOMXWTT.js → db-CSEW4RII.js} +7 -7
- package/dist/instrumentation.js +4 -4
- package/dist/nitro.js +2 -2
- package/dist/{oauth-callback-server-A6ZZX74U.js → oauth-callback-server-FUEV5HNG.js} +24 -24
- package/dist/{runner-KSGB2UAV.js → runner-U3XHSKSH.js} +21 -39
- package/dist/{skills-26QPWKVS.js → skills-AKE6W3WI.js} +6 -6
- package/dist/spawn-B6GDTWJ4.js +39 -0
- package/dist/{validation-OPSRGFGH.js → validation-WDTAULUF.js} +6 -6
- package/dist/version.js +1 -1
- package/dist/{work-VMSW7STJ.js → work-C3HAO2BG.js} +17 -17
- package/dist/{worker-2JNFB7C7.js → worker-LNP4YKBM.js} +10 -10
- package/migrations/0024_misty_typhoid_mary.sql +12 -0
- package/migrations/meta/0024_snapshot.json +2275 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +5 -5
- package/dist/chat/slack/tools/user-lookup.d.ts +0 -27
- package/dist/chat/state/artifacts.d.ts +0 -30
- package/dist/chat/tool-support/turn-deadline-result.d.ts +0 -3
- package/dist/chunk-Q6QZTTLS.js +0 -55
- package/dist/spawn-5LAJXZ2P.js +0 -39
|
@@ -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;
|
|
@@ -25,6 +25,7 @@ export declare function createSearchConversationEventsTool(context: ToolRuntimeC
|
|
|
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 createSearchConversationEventsTool(context: ToolRuntimeC
|
|
|
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-
|
|
6
|
+
} from "./chunk-CSZINQJ2.js";
|
|
7
7
|
import {
|
|
8
8
|
normalizeSlackConversationId
|
|
9
|
-
} from "./chunk-
|
|
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-
|
|
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,
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
coerceThreadConversationState,
|
|
3
|
+
getPersistedThreadState,
|
|
4
|
+
persistThreadStateById
|
|
5
|
+
} from "./chunk-AZ7EAOBE.js";
|
|
1
6
|
import {
|
|
2
7
|
recordTaskExecution
|
|
3
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-AVOCH2Z5.js";
|
|
4
9
|
import {
|
|
5
10
|
pluginTaskId,
|
|
6
11
|
pluginTaskParamsSchema,
|
|
@@ -10,12 +15,10 @@ import {
|
|
|
10
15
|
calculateContextCompactionTargetTokens,
|
|
11
16
|
estimateTextTokens,
|
|
12
17
|
getConversationContextCompactionTriggerTokens
|
|
13
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-K4SZAP3K.js";
|
|
14
19
|
import {
|
|
15
20
|
buildDeterministicTurnId,
|
|
16
21
|
clearPendingAuth,
|
|
17
|
-
coerceThreadConversationState,
|
|
18
|
-
getPersistedThreadState,
|
|
19
22
|
getPiMessageRole,
|
|
20
23
|
getTurnRecord,
|
|
21
24
|
hydrateConversationMessages,
|
|
@@ -24,18 +27,16 @@ import {
|
|
|
24
27
|
isToolResultMessage,
|
|
25
28
|
markTurnClosed,
|
|
26
29
|
markTurnCompleted,
|
|
27
|
-
mergeArtifactsState,
|
|
28
30
|
normalizeToolNameFromResult,
|
|
29
|
-
persistThreadStateById,
|
|
30
31
|
stripRuntimeTurnContext
|
|
31
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-AIOK6LAG.js";
|
|
32
33
|
import {
|
|
33
34
|
JUNIOR_THREAD_STATE_TTL_MS
|
|
34
35
|
} from "./chunk-3Y47VMHV.js";
|
|
35
36
|
import {
|
|
36
37
|
fallbackShortTitle,
|
|
37
38
|
generateShortTitle
|
|
38
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-Z4YU7Z4L.js";
|
|
39
40
|
import {
|
|
40
41
|
createPluginConversationEvents,
|
|
41
42
|
createPluginEmbedder,
|
|
@@ -43,15 +44,15 @@ import {
|
|
|
43
44
|
createPluginModel,
|
|
44
45
|
createPluginState,
|
|
45
46
|
getPlugins
|
|
46
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-YHDERDRO.js";
|
|
47
48
|
import {
|
|
48
49
|
getConversationStore,
|
|
49
50
|
getDb,
|
|
50
51
|
sameActorIdentity
|
|
51
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-YSB2N563.js";
|
|
52
53
|
import {
|
|
53
54
|
getStateAdapter
|
|
54
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-ORO3PWKQ.js";
|
|
55
56
|
import {
|
|
56
57
|
ProviderError,
|
|
57
58
|
botConfig,
|
|
@@ -59,7 +60,7 @@ import {
|
|
|
59
60
|
findProviderError,
|
|
60
61
|
getProviderErrorAttributes,
|
|
61
62
|
getProviderErrorUserMessage
|
|
62
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-7NVJVJID.js";
|
|
63
64
|
import {
|
|
64
65
|
credentialSubjectSchema
|
|
65
66
|
} from "./chunk-RUIXF3YQ.js";
|
|
@@ -70,7 +71,7 @@ import {
|
|
|
70
71
|
buildTurnFailureResponse,
|
|
71
72
|
logWarn,
|
|
72
73
|
setSpanAttributes
|
|
73
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-4LJO56OJ.js";
|
|
74
75
|
|
|
75
76
|
// src/chat/services/conversation-memory.ts
|
|
76
77
|
var CONTEXT_MIN_LIVE_MESSAGES = 12;
|
|
@@ -255,6 +256,7 @@ async function summarizeConversationChunk(messages, conversation, context, deps)
|
|
|
255
256
|
const result = await deps.completeText({
|
|
256
257
|
modelId: botConfig.fastModelId,
|
|
257
258
|
temperature: 0,
|
|
259
|
+
promptName: "junior.thread_compaction",
|
|
258
260
|
messages: [
|
|
259
261
|
{
|
|
260
262
|
role: "user",
|
|
@@ -380,11 +382,6 @@ function getConversationMessageSlackTs(message) {
|
|
|
380
382
|
// src/chat/runtime/delivered-turn-state.ts
|
|
381
383
|
function buildDeliveredTurnStatePatch(args) {
|
|
382
384
|
const conversation = structuredClone(args.conversation);
|
|
383
|
-
const artifactStatePatch = {
|
|
384
|
-
...args.reply.artifactStatePatch ?? {},
|
|
385
|
-
...args.artifactStatePatch ?? {}
|
|
386
|
-
};
|
|
387
|
-
const artifacts = Object.keys(artifactStatePatch).length > 0 ? mergeArtifactsState(args.artifacts, artifactStatePatch) : void 0;
|
|
388
385
|
clearPendingAuth(conversation, args.sessionId);
|
|
389
386
|
markConversationMessage(conversation, args.userMessageId, {
|
|
390
387
|
replied: true,
|
|
@@ -396,7 +393,6 @@ function buildDeliveredTurnStatePatch(args) {
|
|
|
396
393
|
sessionId: args.sessionId
|
|
397
394
|
});
|
|
398
395
|
return {
|
|
399
|
-
artifacts,
|
|
400
396
|
conversation,
|
|
401
397
|
sandboxRef: args.reply.sandboxRef
|
|
402
398
|
};
|
|
@@ -410,7 +406,7 @@ import {
|
|
|
410
406
|
|
|
411
407
|
// src/chat/services/turn-session-routing.ts
|
|
412
408
|
async function resolveTurnSessionRouting(args) {
|
|
413
|
-
const conversationStore = args.conversationStore ?? (await import("./db-
|
|
409
|
+
const conversationStore = args.conversationStore ?? (await import("./db-CSEW4RII.js")).getConversationStore();
|
|
414
410
|
const conversation = await conversationStore.get({
|
|
415
411
|
conversationId: args.conversationId
|
|
416
412
|
});
|