@sentry/junior 0.127.0 → 0.128.1
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-HMCMFIIO.js → agent-hooks-IWQNFJMS.js} +9 -9
- package/dist/api.js +23 -22
- package/dist/app.d.ts +2 -1
- package/dist/app.js +287 -138
- package/dist/{catalog-runtime-MI5UNBZ7.js → catalog-runtime-KLSYFS4A.js} +6 -6
- package/dist/chat/agent-dispatch/context.d.ts +17 -0
- package/dist/chat/agent-dispatch/store.d.ts +1 -1
- package/dist/chat/agent-dispatch/work.d.ts +1 -1
- package/dist/chat/credentials/context.d.ts +27 -0
- package/dist/chat/credentials/subject.d.ts +15 -0
- package/dist/chat/event-tasks/ingest.d.ts +9 -0
- package/dist/chat/event-tasks/store.d.ts +15 -0
- package/dist/chat/event-tasks/tool-support.d.ts +140 -0
- package/dist/chat/event-tasks/types.d.ts +44 -0
- package/dist/chat/plugins/viewer.d.ts +16 -0
- package/dist/chat/resource-events/ingest.d.ts +1 -0
- package/dist/chat/resource-events/store.d.ts +2 -0
- package/dist/chat/resource-events/workspace.d.ts +4 -0
- package/dist/chat/sandbox/command-result.d.ts +3 -22
- package/dist/chat/sandbox/egress/schemas.d.ts +11 -0
- package/dist/chat/sandbox/resources.d.ts +12 -1
- package/dist/chat/services/guardian-action-policy.d.ts +1 -1
- package/dist/chat/slack/dispatch-turn.d.ts +1 -1
- package/dist/chat/slack/tools/canvas/create.d.ts +0 -16
- package/dist/chat/slack/tools/canvas/edit.d.ts +0 -16
- package/dist/chat/slack/tools/canvas/read.d.ts +0 -16
- package/dist/chat/slack/tools/canvas/write.d.ts +0 -16
- package/dist/chat/slack/tools/channel-list-messages.d.ts +0 -16
- package/dist/chat/slack/tools/conversation-search.d.ts +0 -16
- package/dist/chat/slack/tools/list/add-items.d.ts +0 -16
- package/dist/chat/slack/tools/list/create.d.ts +0 -16
- package/dist/chat/slack/tools/list/get-items.d.ts +0 -16
- package/dist/chat/slack/tools/list/update-item.d.ts +0 -16
- package/dist/chat/slack/tools/message-add-reaction.d.ts +0 -16
- package/dist/chat/slack/tools/public-search.d.ts +0 -16
- package/dist/chat/slack/tools/send-files.d.ts +10 -28
- package/dist/chat/slack/tools/thread-read.d.ts +0 -16
- package/dist/chat/slack/tools/user-lookup.d.ts +0 -16
- package/dist/chat/tool-support/action-review.d.ts +1 -1
- package/dist/chat/tool-support/structured-result.d.ts +17 -46
- package/dist/chat/tool-support/text-range-result.d.ts +8 -32
- package/dist/chat/tool-support/zod-tool.d.ts +6 -7
- package/dist/chat/tools/create-event-task.d.ts +65 -0
- package/dist/chat/tools/definition.d.ts +4 -0
- package/dist/chat/tools/delete-event-task.d.ts +57 -0
- package/dist/chat/tools/event-tasks.d.ts +5 -0
- package/dist/chat/tools/handoff/tool.d.ts +0 -16
- package/dist/chat/tools/list-event-tasks.d.ts +55 -0
- package/dist/chat/tools/list-resource-event-subscriptions.d.ts +0 -38
- package/dist/chat/tools/query-conversation-events.d.ts +0 -16
- package/dist/chat/tools/runtime/report-progress.d.ts +0 -16
- package/dist/chat/tools/sandbox/edit-file.d.ts +0 -23
- package/dist/chat/tools/sandbox/file-utils.d.ts +2 -17
- package/dist/chat/tools/sandbox/find-files.d.ts +5 -8
- package/dist/chat/tools/sandbox/grep.d.ts +1 -4
- package/dist/chat/tools/sandbox/list-dir.d.ts +1 -4
- package/dist/chat/tools/search-resource-event-types.d.ts +0 -16
- package/dist/chat/tools/search-tools.d.ts +0 -16
- package/dist/chat/tools/skill/load-skill.d.ts +0 -20
- package/dist/chat/tools/skill/search-mcp-tools.d.ts +0 -16
- package/dist/chat/tools/stop-watching-resources.d.ts +0 -22
- package/dist/chat/tools/system-time.d.ts +0 -16
- package/dist/chat/tools/types.d.ts +8 -4
- package/dist/chat/tools/update-event-task.d.ts +66 -0
- package/dist/chat/tools/watch-resource-events.d.ts +0 -46
- package/dist/chat/tools/web/fetch-content.d.ts +0 -2
- package/dist/chat/tools/web/fetch-tool.d.ts +0 -16
- package/dist/chat/tools/web/image-generate.d.ts +0 -16
- package/dist/chat/tools/web/search.d.ts +0 -16
- package/dist/{chunk-UEMGGJZD.js → chunk-54KP2EAH.js} +12 -12
- package/dist/{chunk-L7L7RYJM.js → chunk-5IR7SGRO.js} +2 -2
- package/dist/{chunk-W3U3YQYI.js → chunk-77VDLF3Z.js} +18 -1
- package/dist/{chunk-Z5LLJNTL.js → chunk-AAMF2IRC.js} +1116 -1083
- package/dist/{chunk-NK7QVIMJ.js → chunk-EHEACYJ6.js} +1 -1
- package/dist/{chunk-JNYR4G7A.js → chunk-EOIA25WC.js} +2 -2
- package/dist/{chunk-HDSDCEPK.js → chunk-EPBBYMNE.js} +1 -1
- package/dist/{chunk-6DU2ZNF7.js → chunk-ETGUGGO2.js} +7 -7
- package/dist/{chunk-TLMI3Q4Q.js → chunk-H4HMCSOZ.js} +199 -94
- package/dist/{chunk-PDG3BSOD.js → chunk-J3YIO3LE.js} +3 -3
- package/dist/{chunk-2M6LYDTB.js → chunk-LIJ4APSS.js} +1 -1
- package/dist/{chunk-JXQWTNDI.js → chunk-MKM5552O.js} +1 -1
- package/dist/{chunk-SH7HDO2D.js → chunk-MZ6ZOWMJ.js} +1 -1
- package/dist/{chunk-NYVMPADK.js → chunk-O3C5BJFD.js} +1 -1
- package/dist/{chunk-FVIU6NQO.js → chunk-O3YROBH4.js} +2 -2
- package/dist/{chunk-WXP2ZXC7.js → chunk-OIQCRZ67.js} +4 -4
- package/dist/{chunk-YSOZT72W.js → chunk-P7UUNWC4.js} +38 -17
- package/dist/{chunk-C7AVHH3H.js → chunk-PLAMHS3D.js} +2 -2
- package/dist/{chunk-AKL3BAYJ.js → chunk-Q5TMMCBV.js} +1 -1
- package/dist/{chunk-2N6EL22B.js → chunk-R2LXTX4J.js} +1 -1
- package/dist/{chunk-VHUMNUJL.js → chunk-REHOYCYS.js} +2 -2
- package/dist/{chunk-4H2NZPFJ.js → chunk-S2O64VXP.js} +6 -6
- package/dist/{chunk-S4PUICSB.js → chunk-SHMHHXD5.js} +34 -5
- package/dist/{chunk-AYICPT5T.js → chunk-TONH5NXR.js} +1 -1
- package/dist/cli/chat.js +27 -27
- package/dist/cli/check.js +7 -7
- package/dist/cli/plugins.js +13 -13
- package/dist/cli/snapshot-create.js +10 -10
- package/dist/cli/upgrade.js +8 -8
- package/dist/db/schema/event-tasks.d.ts +161 -0
- package/dist/db/schema.d.ts +163 -1
- package/dist/{db-N4EY57ZJ.js → db-VOU5QNLY.js} +7 -7
- package/dist/instrumentation.js +4 -4
- package/dist/nitro.js +2 -2
- package/dist/{oauth-callback-server-O62UOQSS.js → oauth-callback-server-GS7FBYBC.js} +18 -18
- package/dist/{runner-SRHRD3NX.js → runner-GSJSBI3J.js} +11 -11
- package/dist/{sandbox-egress-signals-CDFAP67O.js → sandbox-egress-signals-A5HWIQH4.js} +2 -2
- package/dist/{skills-V6X3JVVA.js → skills-DSHG54LM.js} +7 -7
- package/dist/{validation-ZZXZELGH.js → validation-25XWT6TA.js} +7 -7
- package/dist/version.js +1 -1
- package/migrations/0015_magical_ezekiel_stane.sql +11 -0
- package/migrations/meta/0015_snapshot.json +1360 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +6 -6
- package/dist/chat/plugins/viewer-actors.d.ts +0 -6
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { z, type
|
|
2
|
-
import { type JuniorToolResult } from "@/chat/tool-support/structured-result";
|
|
1
|
+
import { z, type ZodTypeAny } from "zod";
|
|
3
2
|
import type { ImageContent, TextContent } from "@earendil-works/pi-ai";
|
|
4
3
|
import type { AnyToolDefinition, JsonSchemaObject, ToolExecuteOptions } from "@/chat/tools/definition";
|
|
5
4
|
type ZodToolDefinitionBase<TInputSchema extends ZodTypeAny> = Pick<AnyToolDefinition, "approvalMode" | "identity" | "source" | "description" | "exposure" | "annotations" | "promptSnippet" | "promptGuidelines" | "executionMode"> & {
|
|
@@ -8,7 +7,7 @@ type ZodToolDefinitionBase<TInputSchema extends ZodTypeAny> = Pick<AnyToolDefini
|
|
|
8
7
|
prepareArguments?: (args: unknown) => z.input<TInputSchema>;
|
|
9
8
|
resolveApprovalMetadata?(input: z.output<TInputSchema>): ReturnType<NonNullable<AnyToolDefinition["resolveApprovalMetadata"]>>;
|
|
10
9
|
};
|
|
11
|
-
type StructuredToolExecuteResult<TOutputSchema extends
|
|
10
|
+
type StructuredToolExecuteResult<TOutputSchema extends ZodTypeAny> = z.input<TOutputSchema> | StructuredToolResultEnvelope<z.input<TOutputSchema>>;
|
|
12
11
|
interface StructuredToolResultEnvelope<TDetails> {
|
|
13
12
|
content: Array<TextContent | ImageContent>;
|
|
14
13
|
details: TDetails;
|
|
@@ -17,7 +16,7 @@ export interface ContentOnlyToolResult {
|
|
|
17
16
|
content: Array<TextContent | ImageContent>;
|
|
18
17
|
details?: never;
|
|
19
18
|
}
|
|
20
|
-
type StructuredZodToolDefinition<TInputSchema extends ZodTypeAny, TOutputSchema extends
|
|
19
|
+
type StructuredZodToolDefinition<TInputSchema extends ZodTypeAny, TOutputSchema extends ZodTypeAny, TExecuteResult extends StructuredToolExecuteResult<TOutputSchema>> = ZodToolDefinitionBase<TInputSchema> & {
|
|
21
20
|
outputSchema: TOutputSchema;
|
|
22
21
|
privateTraceResult?(result: z.output<TOutputSchema>): unknown;
|
|
23
22
|
execute?: (input: z.output<TInputSchema>, options: ToolExecuteOptions) => Promise<TExecuteResult> | TExecuteResult;
|
|
@@ -26,8 +25,8 @@ type ContentZodToolDefinition<TInputSchema extends ZodTypeAny> = ZodToolDefiniti
|
|
|
26
25
|
outputSchema?: undefined;
|
|
27
26
|
execute?: (input: z.output<TInputSchema>, options: ToolExecuteOptions) => Promise<ContentOnlyToolResult> | ContentOnlyToolResult;
|
|
28
27
|
};
|
|
29
|
-
type ParsedStructuredToolExecuteResult<TOutputSchema extends
|
|
30
|
-
type StructuredZodTool<TInputSchema extends ZodTypeAny, TOutputSchema extends
|
|
28
|
+
type ParsedStructuredToolExecuteResult<TOutputSchema extends ZodTypeAny, TExecuteResult> = TExecuteResult extends StructuredToolResultEnvelope<unknown> ? StructuredToolResultEnvelope<z.output<TOutputSchema>> : z.output<TOutputSchema>;
|
|
29
|
+
type StructuredZodTool<TInputSchema extends ZodTypeAny, TOutputSchema extends ZodTypeAny, TExecuteResult> = Omit<AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
|
|
31
30
|
inputSchema: JsonSchemaObject;
|
|
32
31
|
outputSchema: JsonSchemaObject;
|
|
33
32
|
prepareArguments(args: unknown): z.output<TInputSchema>;
|
|
@@ -42,6 +41,6 @@ type ContentZodTool<TInputSchema extends ZodTypeAny> = Omit<AnyToolDefinition, "
|
|
|
42
41
|
/**
|
|
43
42
|
* Define a Junior-owned tool with Zod input parsing and JSON Schema parameters.
|
|
44
43
|
*/
|
|
45
|
-
export declare function zodTool<TInputSchema extends ZodTypeAny, TOutputSchema extends
|
|
44
|
+
export declare function zodTool<TInputSchema extends ZodTypeAny, TOutputSchema extends ZodTypeAny, TExecuteResult extends StructuredToolExecuteResult<TOutputSchema>>(definition: StructuredZodToolDefinition<TInputSchema, TOutputSchema, TExecuteResult>): StructuredZodTool<TInputSchema, TOutputSchema, TExecuteResult>;
|
|
46
45
|
export declare function zodTool<TInputSchema extends ZodTypeAny>(definition: ContentZodToolDefinition<TInputSchema>): ContentZodTool<TInputSchema>;
|
|
47
46
|
export {};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { type ResourceEventCatalog } from "@/chat/resource-events/catalog";
|
|
2
|
+
import type { ToolRuntimeContext } from "@/chat/tools/types";
|
|
3
|
+
/** Create the core tool that stores an event task. */
|
|
4
|
+
export declare function createEventTaskTool(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
|
+
task: string;
|
|
9
|
+
trigger: {
|
|
10
|
+
namespace: string;
|
|
11
|
+
identifier: string;
|
|
12
|
+
resourceType: string;
|
|
13
|
+
label: string;
|
|
14
|
+
events: string[];
|
|
15
|
+
};
|
|
16
|
+
credentialMode?: "system" | "creator" | null | undefined;
|
|
17
|
+
};
|
|
18
|
+
execute?: ((input: unknown, options: import("./definition").ToolExecuteOptions) => {
|
|
19
|
+
task: {
|
|
20
|
+
id: string;
|
|
21
|
+
task: string;
|
|
22
|
+
namespace: string;
|
|
23
|
+
identifier: string;
|
|
24
|
+
resourceType: string;
|
|
25
|
+
label: string;
|
|
26
|
+
events: string[];
|
|
27
|
+
credentialMode: "system" | "creator";
|
|
28
|
+
createdBy: {
|
|
29
|
+
slackUserId: string;
|
|
30
|
+
fullName?: string | undefined;
|
|
31
|
+
userName?: string | undefined;
|
|
32
|
+
};
|
|
33
|
+
triggerAvailable: boolean;
|
|
34
|
+
};
|
|
35
|
+
target?: string | undefined;
|
|
36
|
+
truncated?: boolean | undefined;
|
|
37
|
+
continuation?: {
|
|
38
|
+
arguments: Record<string, unknown>;
|
|
39
|
+
reason?: string | undefined;
|
|
40
|
+
} | undefined;
|
|
41
|
+
} | Promise<{
|
|
42
|
+
task: {
|
|
43
|
+
id: string;
|
|
44
|
+
task: string;
|
|
45
|
+
namespace: string;
|
|
46
|
+
identifier: string;
|
|
47
|
+
resourceType: string;
|
|
48
|
+
label: string;
|
|
49
|
+
events: string[];
|
|
50
|
+
credentialMode: "system" | "creator";
|
|
51
|
+
createdBy: {
|
|
52
|
+
slackUserId: string;
|
|
53
|
+
fullName?: string | undefined;
|
|
54
|
+
userName?: string | undefined;
|
|
55
|
+
};
|
|
56
|
+
triggerAvailable: boolean;
|
|
57
|
+
};
|
|
58
|
+
target?: string | undefined;
|
|
59
|
+
truncated?: boolean | undefined;
|
|
60
|
+
continuation?: {
|
|
61
|
+
arguments: Record<string, unknown>;
|
|
62
|
+
reason?: string | undefined;
|
|
63
|
+
} | undefined;
|
|
64
|
+
}>) | undefined;
|
|
65
|
+
};
|
|
@@ -60,6 +60,8 @@ interface BaseToolDefinition<TInput, TInputSchema extends ToolInputSchema> exten
|
|
|
60
60
|
* Return trusted host metadata for the exact dispatched action.
|
|
61
61
|
*
|
|
62
62
|
* Descriptions and annotations inform review; they do not grant authority.
|
|
63
|
+
* This projection runs before action review and must not activate providers
|
|
64
|
+
* or perform other external side effects.
|
|
63
65
|
*/
|
|
64
66
|
resolveApprovalMetadata?(input: TInput): Promise<ToolApprovalResolution | undefined> | ToolApprovalResolution | undefined;
|
|
65
67
|
executionMode?: ToolExecutionMode;
|
|
@@ -106,6 +108,8 @@ export interface AnyToolDefinition extends ToolApprovalMetadata {
|
|
|
106
108
|
* Return trusted host metadata for the exact dispatched action.
|
|
107
109
|
*
|
|
108
110
|
* Descriptions and annotations inform review; they do not grant authority.
|
|
111
|
+
* This projection runs before action review and must not activate providers
|
|
112
|
+
* or perform other external side effects.
|
|
109
113
|
*/
|
|
110
114
|
resolveApprovalMetadata?(input: unknown): Promise<ToolApprovalResolution | undefined> | ToolApprovalResolution | undefined;
|
|
111
115
|
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { ResourceEventCatalog } from "@/chat/resource-events/catalog";
|
|
2
|
+
import type { ToolRuntimeContext } from "@/chat/tools/types";
|
|
3
|
+
/** Create the core tool that deletes an event task in this destination. */
|
|
4
|
+
export declare function createDeleteEventTaskTool(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
|
+
};
|
|
10
|
+
execute?: ((input: unknown, options: import("./definition").ToolExecuteOptions) => {
|
|
11
|
+
task: {
|
|
12
|
+
id: string;
|
|
13
|
+
task: string;
|
|
14
|
+
namespace: string;
|
|
15
|
+
identifier: string;
|
|
16
|
+
resourceType: string;
|
|
17
|
+
label: string;
|
|
18
|
+
events: string[];
|
|
19
|
+
credentialMode: "system" | "creator";
|
|
20
|
+
createdBy: {
|
|
21
|
+
slackUserId: string;
|
|
22
|
+
fullName?: string | undefined;
|
|
23
|
+
userName?: string | undefined;
|
|
24
|
+
};
|
|
25
|
+
triggerAvailable: boolean;
|
|
26
|
+
};
|
|
27
|
+
target?: string | undefined;
|
|
28
|
+
truncated?: boolean | undefined;
|
|
29
|
+
continuation?: {
|
|
30
|
+
arguments: Record<string, unknown>;
|
|
31
|
+
reason?: string | undefined;
|
|
32
|
+
} | undefined;
|
|
33
|
+
} | Promise<{
|
|
34
|
+
task: {
|
|
35
|
+
id: string;
|
|
36
|
+
task: string;
|
|
37
|
+
namespace: string;
|
|
38
|
+
identifier: string;
|
|
39
|
+
resourceType: string;
|
|
40
|
+
label: string;
|
|
41
|
+
events: string[];
|
|
42
|
+
credentialMode: "system" | "creator";
|
|
43
|
+
createdBy: {
|
|
44
|
+
slackUserId: string;
|
|
45
|
+
fullName?: string | undefined;
|
|
46
|
+
userName?: string | undefined;
|
|
47
|
+
};
|
|
48
|
+
triggerAvailable: boolean;
|
|
49
|
+
};
|
|
50
|
+
target?: string | undefined;
|
|
51
|
+
truncated?: boolean | undefined;
|
|
52
|
+
continuation?: {
|
|
53
|
+
arguments: Record<string, unknown>;
|
|
54
|
+
reason?: string | undefined;
|
|
55
|
+
} | undefined;
|
|
56
|
+
}>) | undefined;
|
|
57
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ResourceEventCatalog } from "@/chat/resource-events/catalog";
|
|
2
|
+
import type { ToolRegistry } from "@/chat/tools/definition";
|
|
3
|
+
import type { ToolRuntimeContext } from "@/chat/tools/types";
|
|
4
|
+
/** Build event task tools for an interactive Slack actor. */
|
|
5
|
+
export declare function createEventTaskTools(context: ToolRuntimeContext, catalog: ResourceEventCatalog): ToolRegistry;
|
|
@@ -9,37 +9,21 @@ export declare function createHandoffTool(handoff: NonNullable<ToolRuntimeContex
|
|
|
9
9
|
};
|
|
10
10
|
execute?: ((input: unknown, options: import("../definition").ToolExecuteOptions) => {
|
|
11
11
|
[x: string]: unknown;
|
|
12
|
-
ok: boolean;
|
|
13
|
-
status: "error" | "success";
|
|
14
12
|
model_profile: string;
|
|
15
13
|
target?: string | undefined;
|
|
16
|
-
data?: unknown;
|
|
17
14
|
truncated?: boolean | undefined;
|
|
18
15
|
continuation?: {
|
|
19
16
|
arguments: Record<string, unknown>;
|
|
20
17
|
reason?: string | undefined;
|
|
21
18
|
} | undefined;
|
|
22
|
-
error?: string | {
|
|
23
|
-
kind: string;
|
|
24
|
-
message: string;
|
|
25
|
-
retryable?: boolean | undefined;
|
|
26
|
-
} | undefined;
|
|
27
19
|
} | Promise<{
|
|
28
20
|
[x: string]: unknown;
|
|
29
|
-
ok: boolean;
|
|
30
|
-
status: "error" | "success";
|
|
31
21
|
model_profile: string;
|
|
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
|
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { ResourceEventCatalog } from "@/chat/resource-events/catalog";
|
|
2
|
+
import type { ToolRuntimeContext } from "@/chat/tools/types";
|
|
3
|
+
/** Create the core tool that lists event tasks for this destination. */
|
|
4
|
+
export declare function createListEventTasksTool(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): Record<string, never>;
|
|
8
|
+
execute?: ((input: unknown, options: import("./definition").ToolExecuteOptions) => {
|
|
9
|
+
tasks: {
|
|
10
|
+
id: string;
|
|
11
|
+
task: string;
|
|
12
|
+
namespace: string;
|
|
13
|
+
identifier: string;
|
|
14
|
+
resourceType: string;
|
|
15
|
+
label: string;
|
|
16
|
+
events: string[];
|
|
17
|
+
credentialMode: "system" | "creator";
|
|
18
|
+
createdBy: {
|
|
19
|
+
slackUserId: string;
|
|
20
|
+
fullName?: string | undefined;
|
|
21
|
+
userName?: string | undefined;
|
|
22
|
+
};
|
|
23
|
+
triggerAvailable: boolean;
|
|
24
|
+
}[];
|
|
25
|
+
truncated: boolean;
|
|
26
|
+
target?: string | undefined;
|
|
27
|
+
continuation?: {
|
|
28
|
+
arguments: Record<string, unknown>;
|
|
29
|
+
reason?: string | undefined;
|
|
30
|
+
} | undefined;
|
|
31
|
+
} | Promise<{
|
|
32
|
+
tasks: {
|
|
33
|
+
id: string;
|
|
34
|
+
task: string;
|
|
35
|
+
namespace: string;
|
|
36
|
+
identifier: string;
|
|
37
|
+
resourceType: string;
|
|
38
|
+
label: string;
|
|
39
|
+
events: string[];
|
|
40
|
+
credentialMode: "system" | "creator";
|
|
41
|
+
createdBy: {
|
|
42
|
+
slackUserId: string;
|
|
43
|
+
fullName?: string | undefined;
|
|
44
|
+
userName?: string | undefined;
|
|
45
|
+
};
|
|
46
|
+
triggerAvailable: boolean;
|
|
47
|
+
}[];
|
|
48
|
+
truncated: boolean;
|
|
49
|
+
target?: string | undefined;
|
|
50
|
+
continuation?: {
|
|
51
|
+
arguments: Record<string, unknown>;
|
|
52
|
+
reason?: string | undefined;
|
|
53
|
+
} | undefined;
|
|
54
|
+
}>) | undefined;
|
|
55
|
+
};
|
|
@@ -5,20 +5,6 @@ export declare function createListResourceEventSubscriptionsTool(context: ToolRu
|
|
|
5
5
|
outputSchema: import("./definition").JsonSchemaObject;
|
|
6
6
|
prepareArguments(args: unknown): Record<string, never>;
|
|
7
7
|
execute?: ((input: unknown, options: import("./definition").ToolExecuteOptions) => {
|
|
8
|
-
ok: true;
|
|
9
|
-
status: "success";
|
|
10
|
-
data: {
|
|
11
|
-
subscriptions: {
|
|
12
|
-
id: string;
|
|
13
|
-
label: string;
|
|
14
|
-
identifier: string;
|
|
15
|
-
namespace: string;
|
|
16
|
-
resourceType: string;
|
|
17
|
-
events: string[];
|
|
18
|
-
intent: string;
|
|
19
|
-
expiresAtMs: number;
|
|
20
|
-
}[];
|
|
21
|
-
};
|
|
22
8
|
subscriptions: {
|
|
23
9
|
id: string;
|
|
24
10
|
label: string;
|
|
@@ -35,26 +21,7 @@ export declare function createListResourceEventSubscriptionsTool(context: ToolRu
|
|
|
35
21
|
arguments: Record<string, unknown>;
|
|
36
22
|
reason?: string | undefined;
|
|
37
23
|
} | undefined;
|
|
38
|
-
error?: string | {
|
|
39
|
-
kind: string;
|
|
40
|
-
message: string;
|
|
41
|
-
retryable?: boolean | undefined;
|
|
42
|
-
} | undefined;
|
|
43
24
|
} | Promise<{
|
|
44
|
-
ok: true;
|
|
45
|
-
status: "success";
|
|
46
|
-
data: {
|
|
47
|
-
subscriptions: {
|
|
48
|
-
id: string;
|
|
49
|
-
label: string;
|
|
50
|
-
identifier: string;
|
|
51
|
-
namespace: string;
|
|
52
|
-
resourceType: string;
|
|
53
|
-
events: string[];
|
|
54
|
-
intent: string;
|
|
55
|
-
expiresAtMs: number;
|
|
56
|
-
}[];
|
|
57
|
-
};
|
|
58
25
|
subscriptions: {
|
|
59
26
|
id: string;
|
|
60
27
|
label: string;
|
|
@@ -71,10 +38,5 @@ export declare function createListResourceEventSubscriptionsTool(context: ToolRu
|
|
|
71
38
|
arguments: Record<string, unknown>;
|
|
72
39
|
reason?: string | undefined;
|
|
73
40
|
} | undefined;
|
|
74
|
-
error?: string | {
|
|
75
|
-
kind: string;
|
|
76
|
-
message: string;
|
|
77
|
-
retryable?: boolean | undefined;
|
|
78
|
-
} | undefined;
|
|
79
41
|
}>) | undefined;
|
|
80
42
|
};
|
|
@@ -13,8 +13,6 @@ export declare function createQueryConversationEventsTool(context: ToolRuntimeCo
|
|
|
13
13
|
};
|
|
14
14
|
execute?: ((input: unknown, options: import("./definition").ToolExecuteOptions) => {
|
|
15
15
|
[x: string]: unknown;
|
|
16
|
-
ok: boolean;
|
|
17
|
-
status: "error" | "success";
|
|
18
16
|
conversation_id: string;
|
|
19
17
|
events: {
|
|
20
18
|
seq: number;
|
|
@@ -26,22 +24,14 @@ export declare function createQueryConversationEventsTool(context: ToolRuntimeCo
|
|
|
26
24
|
has_older: boolean;
|
|
27
25
|
has_newer: boolean;
|
|
28
26
|
target?: string | undefined;
|
|
29
|
-
data?: unknown;
|
|
30
27
|
truncated?: boolean | undefined;
|
|
31
28
|
continuation?: {
|
|
32
29
|
arguments: Record<string, unknown>;
|
|
33
30
|
reason?: string | undefined;
|
|
34
31
|
} | undefined;
|
|
35
|
-
error?: string | {
|
|
36
|
-
kind: string;
|
|
37
|
-
message: string;
|
|
38
|
-
retryable?: boolean | undefined;
|
|
39
|
-
} | undefined;
|
|
40
32
|
omitted_event_count?: number | undefined;
|
|
41
33
|
} | Promise<{
|
|
42
34
|
[x: string]: unknown;
|
|
43
|
-
ok: boolean;
|
|
44
|
-
status: "error" | "success";
|
|
45
35
|
conversation_id: string;
|
|
46
36
|
events: {
|
|
47
37
|
seq: number;
|
|
@@ -53,17 +43,11 @@ export declare function createQueryConversationEventsTool(context: ToolRuntimeCo
|
|
|
53
43
|
has_older: boolean;
|
|
54
44
|
has_newer: boolean;
|
|
55
45
|
target?: string | undefined;
|
|
56
|
-
data?: unknown;
|
|
57
46
|
truncated?: boolean | undefined;
|
|
58
47
|
continuation?: {
|
|
59
48
|
arguments: Record<string, unknown>;
|
|
60
49
|
reason?: string | undefined;
|
|
61
50
|
} | undefined;
|
|
62
|
-
error?: string | {
|
|
63
|
-
kind: string;
|
|
64
|
-
message: string;
|
|
65
|
-
retryable?: boolean | undefined;
|
|
66
|
-
} | undefined;
|
|
67
51
|
omitted_event_count?: number | undefined;
|
|
68
52
|
}>) | undefined;
|
|
69
53
|
};
|
|
@@ -7,35 +7,19 @@ export declare function createReportProgressTool(): Omit<import("../definition")
|
|
|
7
7
|
};
|
|
8
8
|
execute?: ((input: unknown, options: import("../definition").ToolExecuteOptions) => {
|
|
9
9
|
[x: string]: unknown;
|
|
10
|
-
ok: boolean;
|
|
11
|
-
status: "error" | "success";
|
|
12
10
|
target?: string | undefined;
|
|
13
|
-
data?: unknown;
|
|
14
11
|
truncated?: boolean | undefined;
|
|
15
12
|
continuation?: {
|
|
16
13
|
arguments: Record<string, unknown>;
|
|
17
14
|
reason?: string | undefined;
|
|
18
15
|
} | undefined;
|
|
19
|
-
error?: string | {
|
|
20
|
-
kind: string;
|
|
21
|
-
message: string;
|
|
22
|
-
retryable?: boolean | undefined;
|
|
23
|
-
} | undefined;
|
|
24
16
|
} | Promise<{
|
|
25
17
|
[x: string]: unknown;
|
|
26
|
-
ok: boolean;
|
|
27
|
-
status: "error" | "success";
|
|
28
18
|
target?: string | undefined;
|
|
29
|
-
data?: unknown;
|
|
30
19
|
truncated?: boolean | undefined;
|
|
31
20
|
continuation?: {
|
|
32
21
|
arguments: Record<string, unknown>;
|
|
33
22
|
reason?: string | undefined;
|
|
34
23
|
} | undefined;
|
|
35
|
-
error?: string | {
|
|
36
|
-
kind: string;
|
|
37
|
-
message: string;
|
|
38
|
-
retryable?: boolean | undefined;
|
|
39
|
-
} | undefined;
|
|
40
24
|
}>) | undefined;
|
|
41
25
|
};
|
|
@@ -1,41 +1,18 @@
|
|
|
1
1
|
import { type SandboxFileSystem } from "@/chat/tools/sandbox/file-utils";
|
|
2
2
|
import { type TextReplacement } from "@/chat/tools/sandbox/text-edits";
|
|
3
3
|
type EditReplacement = TextReplacement;
|
|
4
|
-
type EditFailureKind = "not_found" | "old_text_not_found" | "old_text_not_unique" | "overlapping_edits" | "no_change" | "invalid_edit";
|
|
5
4
|
interface EditFileResult {
|
|
6
5
|
content: [{
|
|
7
6
|
type: "text";
|
|
8
7
|
text: string;
|
|
9
8
|
}];
|
|
10
9
|
details: {
|
|
11
|
-
data: {
|
|
12
|
-
first_changed_line?: number;
|
|
13
|
-
path: string;
|
|
14
|
-
replacements: number;
|
|
15
|
-
};
|
|
16
10
|
diff: string;
|
|
17
11
|
first_changed_line?: number;
|
|
18
|
-
ok: true;
|
|
19
12
|
path: string;
|
|
20
13
|
replacements: number;
|
|
21
|
-
status: "success";
|
|
22
14
|
target: string;
|
|
23
15
|
truncated: boolean;
|
|
24
|
-
} | {
|
|
25
|
-
data: {
|
|
26
|
-
path: string;
|
|
27
|
-
replacements: number;
|
|
28
|
-
};
|
|
29
|
-
error: {
|
|
30
|
-
kind: EditFailureKind;
|
|
31
|
-
message: string;
|
|
32
|
-
retryable: true;
|
|
33
|
-
};
|
|
34
|
-
ok: false;
|
|
35
|
-
path: string;
|
|
36
|
-
replacements: number;
|
|
37
|
-
status: "error";
|
|
38
|
-
target: string;
|
|
39
16
|
};
|
|
40
17
|
}
|
|
41
18
|
interface EditFileInput {
|
|
@@ -15,24 +15,9 @@ export declare const MAX_TEXT_CHARS = 60000;
|
|
|
15
15
|
export declare const RIPGREP_EXCLUDED_GLOBS: readonly ["!**/.git/**", "!**/node_modules/**"];
|
|
16
16
|
export declare const DEFAULT_SEARCH_COMMAND_TIMEOUT_MS = 30000;
|
|
17
17
|
export type TextSearchResultDetails = {
|
|
18
|
-
ok: true;
|
|
19
|
-
status?: "success";
|
|
20
18
|
target?: string;
|
|
21
19
|
path: string;
|
|
22
20
|
truncated: boolean;
|
|
23
|
-
data?: unknown;
|
|
24
|
-
} | {
|
|
25
|
-
ok: false;
|
|
26
|
-
status?: "error";
|
|
27
|
-
target?: string;
|
|
28
|
-
error: {
|
|
29
|
-
kind: "not_found";
|
|
30
|
-
message: string;
|
|
31
|
-
};
|
|
32
|
-
path: string;
|
|
33
|
-
missing_path?: string;
|
|
34
|
-
truncated: false;
|
|
35
|
-
data?: unknown;
|
|
36
21
|
};
|
|
37
22
|
export interface TextSearchToolResult {
|
|
38
23
|
content: [{
|
|
@@ -52,12 +37,12 @@ export declare function truncateText(value: string, maxChars?: number): {
|
|
|
52
37
|
};
|
|
53
38
|
/** Detect model-facing missing paths without swallowing sandbox lifecycle/API failures. */
|
|
54
39
|
export declare function isMissingPathError(error: unknown): boolean;
|
|
55
|
-
/**
|
|
40
|
+
/** Reject an expected missing search/list path through the tool-error channel. */
|
|
56
41
|
export declare function missingPathSearchResult(params: {
|
|
57
42
|
path: string;
|
|
58
43
|
displayPath?: string;
|
|
59
44
|
missingPath?: string;
|
|
60
|
-
}):
|
|
45
|
+
}): never;
|
|
61
46
|
/** Keep sandbox filesystem tools scoped to the mounted workspace root. */
|
|
62
47
|
export declare function resolveWorkspacePath(input: string | undefined, fallback?: string): string;
|
|
63
48
|
/** Anchor ripgrep paths and globs to the requested search root. */
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { type SandboxCommandRunner, type SandboxFileSystem, type SandboxSearchTelemetry, type TextSearchResultDetails, type TextSearchToolResult } from "@/chat/tools/sandbox/file-utils";
|
|
2
|
-
import { type
|
|
2
|
+
import { type JuniorToolOutputEnvelope } from "@/chat/tool-support/structured-result";
|
|
3
3
|
interface FindFilesSuccessResult {
|
|
4
|
-
content:
|
|
4
|
+
content: JuniorToolOutputEnvelope["content"];
|
|
5
5
|
details: TextSearchResultDetails & {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
path: string;
|
|
10
|
-
truncation_reasons?: string[];
|
|
11
|
-
};
|
|
6
|
+
files: string[];
|
|
7
|
+
file_count: number;
|
|
8
|
+
truncation_reasons?: string[];
|
|
12
9
|
result_limit_reached?: number;
|
|
13
10
|
};
|
|
14
11
|
}
|
|
@@ -14,10 +14,7 @@ interface GrepSuccessResult {
|
|
|
14
14
|
type: "text";
|
|
15
15
|
text: string;
|
|
16
16
|
}];
|
|
17
|
-
details:
|
|
18
|
-
ok: true;
|
|
19
|
-
}> & {
|
|
20
|
-
data: GrepResultData;
|
|
17
|
+
details: TextSearchResultDetails & GrepResultData & {
|
|
21
18
|
line_truncated?: boolean;
|
|
22
19
|
match_limit_reached?: number;
|
|
23
20
|
};
|
|
@@ -11,10 +11,7 @@ interface ListDirSuccessResult {
|
|
|
11
11
|
type: "text";
|
|
12
12
|
text: string;
|
|
13
13
|
}];
|
|
14
|
-
details:
|
|
15
|
-
ok: true;
|
|
16
|
-
}> & {
|
|
17
|
-
data: ListDirResultData;
|
|
14
|
+
details: TextSearchResultDetails & ListDirResultData & {
|
|
18
15
|
entry_limit_reached?: number;
|
|
19
16
|
};
|
|
20
17
|
}
|
|
@@ -9,8 +9,6 @@ export declare function createSearchResourceEventTypesTool(catalog: ResourceEven
|
|
|
9
9
|
maxResults?: number | null | undefined;
|
|
10
10
|
};
|
|
11
11
|
execute?: ((input: unknown, options: import("./definition").ToolExecuteOptions) => {
|
|
12
|
-
ok: boolean;
|
|
13
|
-
status: "error" | "success";
|
|
14
12
|
query: string | null;
|
|
15
13
|
namespace: string | null;
|
|
16
14
|
totalMatches: number;
|
|
@@ -21,20 +19,12 @@ export declare function createSearchResourceEventTypesTool(catalog: ResourceEven
|
|
|
21
19
|
suggestedEvents?: string[] | undefined;
|
|
22
20
|
}[];
|
|
23
21
|
target?: string | undefined;
|
|
24
|
-
data?: unknown;
|
|
25
22
|
truncated?: boolean | undefined;
|
|
26
23
|
continuation?: {
|
|
27
24
|
arguments: Record<string, unknown>;
|
|
28
25
|
reason?: string | undefined;
|
|
29
26
|
} | undefined;
|
|
30
|
-
error?: string | {
|
|
31
|
-
kind: string;
|
|
32
|
-
message: string;
|
|
33
|
-
retryable?: boolean | undefined;
|
|
34
|
-
} | undefined;
|
|
35
27
|
} | Promise<{
|
|
36
|
-
ok: boolean;
|
|
37
|
-
status: "error" | "success";
|
|
38
28
|
query: string | null;
|
|
39
29
|
namespace: string | null;
|
|
40
30
|
totalMatches: number;
|
|
@@ -45,16 +35,10 @@ export declare function createSearchResourceEventTypesTool(catalog: ResourceEven
|
|
|
45
35
|
suggestedEvents?: string[] | undefined;
|
|
46
36
|
}[];
|
|
47
37
|
target?: string | undefined;
|
|
48
|
-
data?: unknown;
|
|
49
38
|
truncated?: boolean | undefined;
|
|
50
39
|
continuation?: {
|
|
51
40
|
arguments: Record<string, unknown>;
|
|
52
41
|
reason?: string | undefined;
|
|
53
42
|
} | undefined;
|
|
54
|
-
error?: string | {
|
|
55
|
-
kind: string;
|
|
56
|
-
message: string;
|
|
57
|
-
retryable?: boolean | undefined;
|
|
58
|
-
} | undefined;
|
|
59
43
|
}>) | undefined;
|
|
60
44
|
};
|
|
@@ -12,8 +12,6 @@ export declare function createSearchToolsTool(catalogTools: Record<string, AnyTo
|
|
|
12
12
|
max_results?: number | null | undefined;
|
|
13
13
|
};
|
|
14
14
|
execute?: ((input: unknown, options: import("@/chat/tools/definition").ToolExecuteOptions) => {
|
|
15
|
-
ok: boolean;
|
|
16
|
-
status: "error" | "success";
|
|
17
15
|
query: string | null;
|
|
18
16
|
source: string | null;
|
|
19
17
|
sources: {
|
|
@@ -35,20 +33,12 @@ export declare function createSearchToolsTool(catalogTools: Record<string, AnyTo
|
|
|
35
33
|
source?: string | undefined;
|
|
36
34
|
}[];
|
|
37
35
|
target?: string | undefined;
|
|
38
|
-
data?: unknown;
|
|
39
36
|
truncated?: boolean | undefined;
|
|
40
37
|
continuation?: {
|
|
41
38
|
arguments: Record<string, unknown>;
|
|
42
39
|
reason?: string | undefined;
|
|
43
40
|
} | undefined;
|
|
44
|
-
error?: string | {
|
|
45
|
-
kind: string;
|
|
46
|
-
message: string;
|
|
47
|
-
retryable?: boolean | undefined;
|
|
48
|
-
} | undefined;
|
|
49
41
|
} | Promise<{
|
|
50
|
-
ok: boolean;
|
|
51
|
-
status: "error" | "success";
|
|
52
42
|
query: string | null;
|
|
53
43
|
source: string | null;
|
|
54
44
|
sources: {
|
|
@@ -70,16 +60,10 @@ export declare function createSearchToolsTool(catalogTools: Record<string, AnyTo
|
|
|
70
60
|
source?: string | undefined;
|
|
71
61
|
}[];
|
|
72
62
|
target?: string | undefined;
|
|
73
|
-
data?: unknown;
|
|
74
63
|
truncated?: boolean | undefined;
|
|
75
64
|
continuation?: {
|
|
76
65
|
arguments: Record<string, unknown>;
|
|
77
66
|
reason?: string | undefined;
|
|
78
67
|
} | undefined;
|
|
79
|
-
error?: string | {
|
|
80
|
-
kind: string;
|
|
81
|
-
message: string;
|
|
82
|
-
retryable?: boolean | undefined;
|
|
83
|
-
} | undefined;
|
|
84
68
|
}>) | undefined;
|
|
85
69
|
};
|