@sentry/junior 0.91.0 → 0.92.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-MXAF7RQL.js → agent-hooks-KL7I3ZRC.js} +7 -7
- package/dist/api/people/list.d.ts +3 -3
- package/dist/api/people/list.js +15 -15
- package/dist/api/people/list.query.d.ts +2 -2
- package/dist/api/people/profile.d.ts +3 -3
- package/dist/api/people/profile.js +12 -12
- package/dist/api/people/profile.query.d.ts +2 -2
- package/dist/api/people/shared.d.ts +13 -13
- package/dist/api/people/types.d.ts +12 -12
- package/dist/api-reference.d.ts +1 -1
- package/dist/app.js +365 -265
- package/dist/{catalog-runtime-DXE6NXHT.js → catalog-runtime-NZHMSMYC.js} +2 -2
- package/dist/chat/actor.d.ts +75 -0
- package/dist/chat/agent/prompt.d.ts +2 -2
- package/dist/chat/agent/request.d.ts +13 -13
- package/dist/chat/agent/resume.d.ts +5 -4
- package/dist/chat/agent/tools.d.ts +4 -2
- package/dist/chat/capabilities/jr-rpc-command.d.ts +1 -1
- package/dist/chat/conversation-privacy.d.ts +11 -0
- package/dist/chat/conversations/sql/migrations.d.ts +1 -1
- package/dist/chat/conversations/sql/schema/conversations.d.ts +2 -19
- package/dist/chat/conversations/sql/schema.d.ts +2 -19
- package/dist/chat/conversations/sql/store.d.ts +3 -3
- package/dist/chat/conversations/store.d.ts +4 -4
- package/dist/chat/credentials/context.d.ts +4 -4
- package/dist/chat/logging.d.ts +2 -2
- package/dist/chat/no-reply.d.ts +1 -1
- package/dist/chat/oauth-flow.d.ts +1 -1
- package/dist/chat/pi/messages.d.ts +2 -2
- package/dist/chat/pi/transcript.d.ts +15 -0
- package/dist/chat/plugins/agent-hooks.d.ts +5 -3
- package/dist/chat/plugins/credential-hooks.d.ts +2 -8
- package/dist/chat/prompt.d.ts +3 -6
- package/dist/chat/runtime/reply-executor.d.ts +1 -1
- package/dist/chat/runtime/turn-input.d.ts +1 -1
- package/dist/chat/sandbox/egress/schemas.d.ts +2 -2
- package/dist/chat/sandbox/egress/session.d.ts +1 -1
- package/dist/chat/services/context-compaction.d.ts +1 -1
- package/dist/chat/services/conversation-memory.d.ts +1 -1
- package/dist/chat/services/mcp-auth-orchestration.d.ts +1 -1
- package/dist/chat/services/message-actor-identity.d.ts +4 -4
- package/dist/chat/services/pending-auth.d.ts +2 -2
- package/dist/chat/services/plugin-auth-orchestration.d.ts +1 -1
- package/dist/chat/services/provider-default-config.d.ts +1 -1
- package/dist/chat/services/subscribed-decision.d.ts +1 -1
- package/dist/chat/services/turn-result.d.ts +1 -1
- package/dist/chat/services/turn-session-record.d.ts +11 -8
- package/dist/chat/services/turn-thinking-level.d.ts +1 -1
- package/dist/chat/slack/assistant-thread/title.d.ts +1 -1
- package/dist/chat/slack/tools/canvas/create.d.ts +41 -1
- package/dist/chat/slack/tools/canvas/edit.d.ts +60 -1
- package/dist/chat/slack/tools/canvas/read.d.ts +60 -1
- package/dist/chat/slack/tools/canvas/write.d.ts +41 -1
- package/dist/chat/slack/tools/channel-list-messages.d.ts +45 -1
- package/dist/chat/slack/tools/context.d.ts +3 -3
- package/dist/chat/slack/tools/list/add-items.d.ts +42 -1
- package/dist/chat/slack/tools/list/create.d.ts +40 -1
- package/dist/chat/slack/tools/list/get-items.d.ts +40 -1
- package/dist/chat/slack/tools/list/update-item.d.ts +46 -1
- package/dist/chat/slack/tools/message-add-reaction.d.ts +40 -1
- package/dist/chat/slack/tools/send-message.d.ts +45 -1
- package/dist/chat/slack/tools/thread-read.d.ts +44 -1
- package/dist/chat/slack/tools/user-lookup.d.ts +45 -1
- package/dist/chat/slack/user.d.ts +3 -3
- package/dist/chat/slack/vision-context.d.ts +2 -2
- package/dist/chat/sql/schema.d.ts +2 -19
- package/dist/chat/state/conversation-details.d.ts +4 -4
- package/dist/chat/state/conversation.d.ts +1 -1
- package/dist/chat/state/session-log.d.ts +140 -26
- package/dist/chat/state/turn-session.d.ts +18 -5
- package/dist/chat/task-execution/slack-work.d.ts +2 -2
- package/dist/chat/task-execution/state.d.ts +4 -4
- package/dist/chat/tool-support/zod-tool.d.ts +16 -4
- package/dist/chat/tools/advisor/tool.d.ts +41 -1
- package/dist/chat/tools/definition.d.ts +10 -0
- package/dist/chat/tools/execute-tool.d.ts +41 -1
- package/dist/chat/tools/resource-events.d.ts +124 -3
- package/dist/chat/tools/runtime/report-progress.d.ts +40 -1
- package/dist/chat/tools/sandbox/bash.d.ts +41 -1
- package/dist/chat/tools/sandbox/edit-file.d.ts +44 -1
- package/dist/chat/tools/sandbox/find-files.d.ts +42 -1
- package/dist/chat/tools/sandbox/grep.d.ts +46 -1
- package/dist/chat/tools/sandbox/list-dir.d.ts +41 -1
- package/dist/chat/tools/sandbox/read-file.d.ts +42 -1
- package/dist/chat/tools/sandbox/write-file.d.ts +41 -1
- package/dist/chat/tools/search-tools.d.ts +102 -1
- package/dist/chat/tools/skill/call-mcp-tool.d.ts +10 -1
- package/dist/chat/tools/skill/load-skill.d.ts +40 -1
- package/dist/chat/tools/skill/search-mcp-tools.d.ts +100 -1
- package/dist/chat/tools/system-time.d.ts +38 -1
- package/dist/chat/tools/types.d.ts +4 -4
- package/dist/chat/tools/web/fetch-tool.d.ts +41 -1
- package/dist/chat/tools/web/image-generate.d.ts +62 -1
- package/dist/chat/tools/web/search.d.ts +41 -1
- package/dist/{chunk-HXL2ZV74.js → chunk-3F54A3YM.js} +82 -11
- package/dist/{chunk-ZGDTBSQ7.js → chunk-56SIBIVF.js} +930 -660
- package/dist/{chunk-DACFZ5CI.js → chunk-7K3JALTQ.js} +18 -12
- package/dist/{chunk-IRRMABQD.js → chunk-APIVR44P.js} +10 -10
- package/dist/{chunk-XP7F4LYB.js → chunk-BTH37NCU.js} +4 -4
- package/dist/{chunk-5GBUZI6M.js → chunk-H7KUZAMZ.js} +4 -4
- package/dist/{chunk-PIB4EOW6.js → chunk-IWKVXO3F.js} +19 -72
- package/dist/{chunk-TYUXD3FN.js → chunk-MC4ZZE4Q.js} +1 -1
- package/dist/{chunk-2S7M37HY.js → chunk-NIFONS4W.js} +86 -47
- package/dist/{chunk-AOISHLSF.js → chunk-O6ZYIHFC.js} +143 -20
- package/dist/{chunk-GCWD2VHP.js → chunk-OQQU3SD6.js} +285 -124
- package/dist/{chunk-NW7AXDA5.js → chunk-OZJXGX4U.js} +2 -2
- package/dist/{chunk-KC42JAAQ.js → chunk-PFXC67GJ.js} +3 -3
- package/dist/{chunk-QCKGI74V.js → chunk-PGR4WGZW.js} +10 -10
- package/dist/{chunk-ZUK7BL63.js → chunk-S6QKIGRM.js} +66 -54
- package/dist/{chunk-IX76WFJV.js → chunk-TF5VLGA7.js} +10 -10
- package/dist/{chunk-AN2437E3.js → chunk-YTNPU7I2.js} +2 -2
- package/dist/{chunk-3MPOMK3K.js → chunk-YYBX2BD5.js} +61 -3
- package/dist/{chunk-ONFOWI2D.js → chunk-Z4FOYQXW.js} +16 -15
- package/dist/{chunk-RS6ANWVT.js → chunk-ZATRYQLR.js} +1 -1
- package/dist/cli/chat.js +20 -20
- package/dist/cli/check.js +3 -3
- package/dist/cli/plugins.js +9 -9
- package/dist/cli/snapshot-warmup.js +6 -6
- package/dist/cli/upgrade.js +9 -9
- package/dist/{db-CXI7PR5U.js → db-GCK43OO3.js} +4 -4
- package/dist/instrumentation.js +1 -1
- package/dist/reporting/conversations.d.ts +3 -3
- package/dist/reporting.d.ts +1 -1
- package/dist/reporting.js +48 -50
- package/dist/{runner-FKL3RAHA.js → runner-Y73GZ2VE.js} +20 -18
- package/dist/{validation-I7GD2YWS.js → validation-KYAWETI4.js} +3 -3
- package/package.json +6 -6
- package/dist/chat/requester.d.ts +0 -68
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type Destination, type Source } from "@sentry/junior-plugin-api";
|
|
2
2
|
import type { PiMessage } from "@/chat/pi/messages";
|
|
3
|
-
import { type
|
|
3
|
+
import { type Actor } from "@/chat/actor";
|
|
4
|
+
import { type PiMessageProvenance } from "./session-log";
|
|
4
5
|
import type { AgentTurnUsage } from "@/chat/usage";
|
|
5
6
|
import type { ConversationPrivacy } from "@/chat/conversation-privacy";
|
|
6
7
|
import type { ConversationStore } from "@/chat/conversations/store";
|
|
@@ -19,7 +20,17 @@ export interface AgentTurnSessionRecord {
|
|
|
19
20
|
lastProgressAtMs: number;
|
|
20
21
|
loadedSkillNames?: string[];
|
|
21
22
|
piMessages: PiMessage[];
|
|
22
|
-
|
|
23
|
+
/** Per-message provenance aligned one-to-one with `piMessages`. */
|
|
24
|
+
piMessageProvenance: PiMessageProvenance[];
|
|
25
|
+
/**
|
|
26
|
+
* All distinct actors annotated on this run's committed instruction-authority
|
|
27
|
+
* messages, in first-seen order. Derived from `piMessageProvenance` at
|
|
28
|
+
* materialization — never persisted separately, so it cannot drift from
|
|
29
|
+
* provenance. Attribution only; never an authority source.
|
|
30
|
+
*/
|
|
31
|
+
actors: Actor[];
|
|
32
|
+
/** The single actor this run executes as (credential binding, auth flows). */
|
|
33
|
+
actor?: Actor;
|
|
23
34
|
resumeReason?: AgentTurnResumeReason;
|
|
24
35
|
resumedFromSliceId?: number;
|
|
25
36
|
sessionId: string;
|
|
@@ -31,7 +42,7 @@ export interface AgentTurnSessionRecord {
|
|
|
31
42
|
turnStartMessageIndex?: number;
|
|
32
43
|
updatedAtMs: number;
|
|
33
44
|
}
|
|
34
|
-
export type AgentTurnSessionSummary = Omit<AgentTurnSessionRecord, "errorMessage" | "piMessages" | "turnStartMessageIndex">;
|
|
45
|
+
export type AgentTurnSessionSummary = Omit<AgentTurnSessionRecord, "errorMessage" | "actors" | "piMessages" | "piMessageProvenance" | "turnStartMessageIndex">;
|
|
35
46
|
/** Read a materialized turn session record for resume and history loading. */
|
|
36
47
|
export declare function getAgentTurnSessionRecord(conversationId: string, sessionId: string): Promise<AgentTurnSessionRecord | undefined>;
|
|
37
48
|
/** Commit stable Pi session state and advance the turn session record. */
|
|
@@ -52,7 +63,9 @@ export declare function upsertAgentTurnSessionRecord(args: {
|
|
|
52
63
|
state: AgentTurnSessionStatus;
|
|
53
64
|
surface?: AgentTurnSurface;
|
|
54
65
|
piMessages: PiMessage[];
|
|
55
|
-
|
|
66
|
+
/** Provenance for trailing newly committed messages, such as steering. */
|
|
67
|
+
trailingMessageProvenance?: PiMessageProvenance[];
|
|
68
|
+
actor?: Actor;
|
|
56
69
|
resumeReason?: AgentTurnResumeReason;
|
|
57
70
|
errorMessage?: string;
|
|
58
71
|
resumedFromSliceId?: number;
|
|
@@ -77,7 +90,7 @@ export declare function recordAgentTurnSessionSummary(args: {
|
|
|
77
90
|
lastProgressAtMs?: number;
|
|
78
91
|
loadedSkillNames?: string[];
|
|
79
92
|
conversationStore?: ConversationStore;
|
|
80
|
-
|
|
93
|
+
actor?: Actor;
|
|
81
94
|
resumeReason?: AgentTurnResumeReason;
|
|
82
95
|
sessionId: string;
|
|
83
96
|
sliceId: number;
|
|
@@ -5,7 +5,7 @@ import type { ConversationStore } from "@/chat/conversations/store";
|
|
|
5
5
|
import type { InboundMessage } from "@/chat/task-execution/store";
|
|
6
6
|
import type { ConversationWorkerContext, ConversationWorkerResult } from "@/chat/task-execution/worker";
|
|
7
7
|
import { type SlackInstallationContext } from "@/chat/slack/adapter-context";
|
|
8
|
-
import { type
|
|
8
|
+
import { type SlackActorProfile } from "@/chat/actor";
|
|
9
9
|
export type SlackConversationRoute = "mention" | "subscribed";
|
|
10
10
|
export interface SlackConversationMessageMetadata {
|
|
11
11
|
[key: string]: unknown;
|
|
@@ -44,7 +44,7 @@ interface SlackResourceEventInboundInput {
|
|
|
44
44
|
}
|
|
45
45
|
export interface CreateSlackConversationWorkerOptions {
|
|
46
46
|
getSlackAdapter: () => SlackAdapter;
|
|
47
|
-
lookupSlackUser?: (teamId: string, userId: string) => Promise<
|
|
47
|
+
lookupSlackUser?: (teamId: string, userId: string) => Promise<SlackActorProfile | null | undefined>;
|
|
48
48
|
resumeAwaitingContinuation: (conversationId: string) => Promise<boolean>;
|
|
49
49
|
conversationStore?: ConversationStore;
|
|
50
50
|
runtime: SlackInboxTurnRuntime;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { StateAdapter } from "chat";
|
|
2
2
|
import type { Destination } from "@sentry/junior-plugin-api";
|
|
3
|
-
import { type
|
|
3
|
+
import { type StoredSlackActor } from "@/chat/actor";
|
|
4
4
|
declare class InvalidConversationRecordError extends Error {
|
|
5
5
|
constructor(conversationId: string);
|
|
6
6
|
}
|
|
@@ -55,7 +55,7 @@ export interface Conversation {
|
|
|
55
55
|
destination?: Destination;
|
|
56
56
|
execution: ConversationExecution;
|
|
57
57
|
lastActivityAtMs: number;
|
|
58
|
-
|
|
58
|
+
actor?: StoredSlackActor;
|
|
59
59
|
schemaVersion: 1;
|
|
60
60
|
source?: Source;
|
|
61
61
|
title?: string;
|
|
@@ -131,7 +131,7 @@ export declare function recordConversationActivity(args: {
|
|
|
131
131
|
conversationId: string;
|
|
132
132
|
destination?: Destination;
|
|
133
133
|
nowMs?: number;
|
|
134
|
-
|
|
134
|
+
actor?: StoredSlackActor;
|
|
135
135
|
source?: Source;
|
|
136
136
|
state?: StateAdapter;
|
|
137
137
|
title?: string;
|
|
@@ -150,7 +150,7 @@ export declare function recordConversationExecution(args: {
|
|
|
150
150
|
updatedAtMs?: number;
|
|
151
151
|
};
|
|
152
152
|
lastActivityAtMs: number;
|
|
153
|
-
|
|
153
|
+
actor?: StoredSlackActor;
|
|
154
154
|
source?: Source;
|
|
155
155
|
state?: StateAdapter;
|
|
156
156
|
title?: string;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { z, type ZodType, type ZodTypeAny } from "zod";
|
|
2
2
|
import { type JuniorToolResult } from "@/chat/tool-support/structured-result";
|
|
3
3
|
import type { ImageContent, TextContent } from "@earendil-works/pi-ai";
|
|
4
|
-
import type { AnyToolDefinition, ToolExecuteOptions } from "@/chat/tools/definition";
|
|
4
|
+
import type { AnyToolDefinition, JsonSchemaObject, ToolExecuteOptions } from "@/chat/tools/definition";
|
|
5
5
|
type ZodToolDefinitionBase<TInputSchema extends ZodTypeAny> = Pick<AnyToolDefinition, "identity" | "description" | "exposure" | "annotations" | "promptSnippet" | "promptGuidelines" | "executionMode"> & {
|
|
6
6
|
inputSchema: TInputSchema;
|
|
7
7
|
prepareArguments?: (args: unknown) => z.input<TInputSchema>;
|
|
8
8
|
};
|
|
9
9
|
type StructuredToolExecuteResult<TOutputSchema extends ZodType<JuniorToolResult>> = z.input<TOutputSchema>;
|
|
10
|
-
interface ContentOnlyToolResult {
|
|
10
|
+
export interface ContentOnlyToolResult {
|
|
11
11
|
content: Array<TextContent | ImageContent>;
|
|
12
12
|
details?: never;
|
|
13
13
|
}
|
|
@@ -19,9 +19,21 @@ type ContentZodToolDefinition<TInputSchema extends ZodTypeAny> = ZodToolDefiniti
|
|
|
19
19
|
outputSchema?: undefined;
|
|
20
20
|
execute?: (input: z.output<TInputSchema>, options: ToolExecuteOptions) => Promise<ContentOnlyToolResult> | ContentOnlyToolResult;
|
|
21
21
|
};
|
|
22
|
+
type StructuredZodTool<TInputSchema extends ZodTypeAny, TOutputSchema extends ZodType<JuniorToolResult>> = Omit<AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
|
|
23
|
+
inputSchema: JsonSchemaObject;
|
|
24
|
+
outputSchema: JsonSchemaObject;
|
|
25
|
+
prepareArguments(args: unknown): z.output<TInputSchema>;
|
|
26
|
+
execute?: (input: unknown, options: ToolExecuteOptions) => Promise<z.output<TOutputSchema>> | z.output<TOutputSchema>;
|
|
27
|
+
};
|
|
28
|
+
type ContentZodTool<TInputSchema extends ZodTypeAny> = Omit<AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
|
|
29
|
+
inputSchema: JsonSchemaObject;
|
|
30
|
+
outputSchema?: undefined;
|
|
31
|
+
prepareArguments(args: unknown): z.output<TInputSchema>;
|
|
32
|
+
execute?: (input: unknown, options: ToolExecuteOptions) => Promise<ContentOnlyToolResult> | ContentOnlyToolResult;
|
|
33
|
+
};
|
|
22
34
|
/**
|
|
23
35
|
* Define a Junior-owned tool with Zod input parsing and JSON Schema parameters.
|
|
24
36
|
*/
|
|
25
|
-
export declare function zodTool<TInputSchema extends ZodTypeAny, TOutputSchema extends ZodType<JuniorToolResult>>(definition: StructuredZodToolDefinition<TInputSchema, TOutputSchema>):
|
|
26
|
-
export declare function zodTool<TInputSchema extends ZodTypeAny>(definition: ContentZodToolDefinition<TInputSchema>):
|
|
37
|
+
export declare function zodTool<TInputSchema extends ZodTypeAny, TOutputSchema extends ZodType<JuniorToolResult>>(definition: StructuredZodToolDefinition<TInputSchema, TOutputSchema>): StructuredZodTool<TInputSchema, TOutputSchema>;
|
|
38
|
+
export declare function zodTool<TInputSchema extends ZodTypeAny>(definition: ContentZodToolDefinition<TInputSchema>): ContentZodTool<TInputSchema>;
|
|
27
39
|
export {};
|
|
@@ -24,4 +24,44 @@ export interface AdvisorToolRuntimeContext {
|
|
|
24
24
|
/** Build the advisor's read-only tool definition subset. */
|
|
25
25
|
export declare function createAdvisorToolDefinitions(definitions: Record<string, AnyToolDefinition>): Record<string, AnyToolDefinition>;
|
|
26
26
|
/** Create the advisor tool backed by conversation-scoped message history. */
|
|
27
|
-
export declare function createAdvisorTool(context: AdvisorToolRuntimeContext): AnyToolDefinition
|
|
27
|
+
export declare function createAdvisorTool(context: AdvisorToolRuntimeContext): Omit<AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
|
|
28
|
+
inputSchema: import("@/chat/tools/definition").JsonSchemaObject;
|
|
29
|
+
outputSchema: import("@/chat/tools/definition").JsonSchemaObject;
|
|
30
|
+
prepareArguments(args: unknown): {
|
|
31
|
+
question: string;
|
|
32
|
+
context: string;
|
|
33
|
+
};
|
|
34
|
+
execute?: ((input: unknown, options: import("@/chat/tools/definition").ToolExecuteOptions) => {
|
|
35
|
+
[x: string]: unknown;
|
|
36
|
+
ok: boolean;
|
|
37
|
+
status: "error" | "success";
|
|
38
|
+
target?: string | undefined;
|
|
39
|
+
data?: unknown;
|
|
40
|
+
truncated?: boolean | undefined;
|
|
41
|
+
continuation?: {
|
|
42
|
+
arguments: Record<string, unknown>;
|
|
43
|
+
reason?: string | undefined;
|
|
44
|
+
} | undefined;
|
|
45
|
+
error?: string | {
|
|
46
|
+
kind: string;
|
|
47
|
+
message: string;
|
|
48
|
+
retryable?: boolean | undefined;
|
|
49
|
+
} | undefined;
|
|
50
|
+
} | Promise<{
|
|
51
|
+
[x: string]: unknown;
|
|
52
|
+
ok: boolean;
|
|
53
|
+
status: "error" | "success";
|
|
54
|
+
target?: string | undefined;
|
|
55
|
+
data?: unknown;
|
|
56
|
+
truncated?: boolean | undefined;
|
|
57
|
+
continuation?: {
|
|
58
|
+
arguments: Record<string, unknown>;
|
|
59
|
+
reason?: string | undefined;
|
|
60
|
+
} | undefined;
|
|
61
|
+
error?: string | {
|
|
62
|
+
kind: string;
|
|
63
|
+
message: string;
|
|
64
|
+
retryable?: boolean | undefined;
|
|
65
|
+
} | undefined;
|
|
66
|
+
}>) | undefined;
|
|
67
|
+
};
|
|
@@ -23,6 +23,11 @@ interface BaseToolDefinition<TInput, TInputSchema extends ToolInputSchema> {
|
|
|
23
23
|
name: string;
|
|
24
24
|
plugin: string;
|
|
25
25
|
};
|
|
26
|
+
/** Stable model-facing catalog grouping for deferred tool discovery. */
|
|
27
|
+
source?: {
|
|
28
|
+
description: string;
|
|
29
|
+
id: string;
|
|
30
|
+
};
|
|
26
31
|
description: string;
|
|
27
32
|
exposure?: ToolExposure;
|
|
28
33
|
inputSchema: TInputSchema;
|
|
@@ -56,6 +61,11 @@ export interface AnyToolDefinition {
|
|
|
56
61
|
name: string;
|
|
57
62
|
plugin: string;
|
|
58
63
|
};
|
|
64
|
+
/** Stable model-facing catalog grouping for deferred tool discovery. */
|
|
65
|
+
source?: {
|
|
66
|
+
description: string;
|
|
67
|
+
id: string;
|
|
68
|
+
};
|
|
59
69
|
description: string;
|
|
60
70
|
exposure?: ToolExposure;
|
|
61
71
|
inputSchema: ToolInputSchema;
|
|
@@ -1,3 +1,43 @@
|
|
|
1
1
|
export declare const EXECUTE_TOOL_NAME = "executeTool";
|
|
2
2
|
/** Create the model-visible dispatcher schema for catalog tools. */
|
|
3
|
-
export declare function createExecuteToolTool(): import("./definition").AnyToolDefinition
|
|
3
|
+
export declare function createExecuteToolTool(): Omit<import("./definition").AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
|
|
4
|
+
inputSchema: import("./definition").JsonSchemaObject;
|
|
5
|
+
outputSchema: import("./definition").JsonSchemaObject;
|
|
6
|
+
prepareArguments(args: unknown): {
|
|
7
|
+
tool_name: string;
|
|
8
|
+
arguments?: Record<string, unknown> | undefined;
|
|
9
|
+
};
|
|
10
|
+
execute?: ((input: unknown, options: import("./definition").ToolExecuteOptions) => {
|
|
11
|
+
[x: string]: unknown;
|
|
12
|
+
ok: boolean;
|
|
13
|
+
status: "error" | "success";
|
|
14
|
+
target?: string | undefined;
|
|
15
|
+
data?: unknown;
|
|
16
|
+
truncated?: boolean | undefined;
|
|
17
|
+
continuation?: {
|
|
18
|
+
arguments: Record<string, unknown>;
|
|
19
|
+
reason?: string | undefined;
|
|
20
|
+
} | undefined;
|
|
21
|
+
error?: string | {
|
|
22
|
+
kind: string;
|
|
23
|
+
message: string;
|
|
24
|
+
retryable?: boolean | undefined;
|
|
25
|
+
} | undefined;
|
|
26
|
+
} | Promise<{
|
|
27
|
+
[x: string]: unknown;
|
|
28
|
+
ok: boolean;
|
|
29
|
+
status: "error" | "success";
|
|
30
|
+
target?: string | undefined;
|
|
31
|
+
data?: unknown;
|
|
32
|
+
truncated?: boolean | undefined;
|
|
33
|
+
continuation?: {
|
|
34
|
+
arguments: Record<string, unknown>;
|
|
35
|
+
reason?: string | undefined;
|
|
36
|
+
} | undefined;
|
|
37
|
+
error?: string | {
|
|
38
|
+
kind: string;
|
|
39
|
+
message: string;
|
|
40
|
+
retryable?: boolean | undefined;
|
|
41
|
+
} | undefined;
|
|
42
|
+
}>) | undefined;
|
|
43
|
+
};
|
|
@@ -2,8 +2,129 @@ import type { ToolRuntimeContext } from "@/chat/tools/types";
|
|
|
2
2
|
/** Return whether the current runtime can safely manage conversation subscriptions. */
|
|
3
3
|
export declare function canUseResourceEventSubscriptionTools(context: ToolRuntimeContext): boolean;
|
|
4
4
|
/** Create the tool that subscribes the current conversation to resource events. */
|
|
5
|
-
export declare function createSubscribeToResourceEventsTool(context: ToolRuntimeContext): import("./definition").AnyToolDefinition
|
|
5
|
+
export declare function createSubscribeToResourceEventsTool(context: ToolRuntimeContext): Omit<import("./definition").AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
|
|
6
|
+
inputSchema: import("./definition").JsonSchemaObject;
|
|
7
|
+
outputSchema: import("./definition").JsonSchemaObject;
|
|
8
|
+
prepareArguments(args: unknown): {
|
|
9
|
+
resourceRef: string;
|
|
10
|
+
provider: string;
|
|
11
|
+
resourceType: string;
|
|
12
|
+
label: string;
|
|
13
|
+
events: string[];
|
|
14
|
+
intent: string;
|
|
15
|
+
ttlMs?: number | undefined;
|
|
16
|
+
};
|
|
17
|
+
execute?: ((input: unknown, options: import("./definition").ToolExecuteOptions) => {
|
|
18
|
+
[x: string]: unknown;
|
|
19
|
+
ok: boolean;
|
|
20
|
+
status: "error" | "success";
|
|
21
|
+
target?: string | undefined;
|
|
22
|
+
data?: unknown;
|
|
23
|
+
truncated?: boolean | undefined;
|
|
24
|
+
continuation?: {
|
|
25
|
+
arguments: Record<string, unknown>;
|
|
26
|
+
reason?: string | undefined;
|
|
27
|
+
} | undefined;
|
|
28
|
+
error?: string | {
|
|
29
|
+
kind: string;
|
|
30
|
+
message: string;
|
|
31
|
+
retryable?: boolean | undefined;
|
|
32
|
+
} | undefined;
|
|
33
|
+
} | Promise<{
|
|
34
|
+
[x: string]: unknown;
|
|
35
|
+
ok: boolean;
|
|
36
|
+
status: "error" | "success";
|
|
37
|
+
target?: string | undefined;
|
|
38
|
+
data?: unknown;
|
|
39
|
+
truncated?: boolean | undefined;
|
|
40
|
+
continuation?: {
|
|
41
|
+
arguments: Record<string, unknown>;
|
|
42
|
+
reason?: string | undefined;
|
|
43
|
+
} | undefined;
|
|
44
|
+
error?: string | {
|
|
45
|
+
kind: string;
|
|
46
|
+
message: string;
|
|
47
|
+
retryable?: boolean | undefined;
|
|
48
|
+
} | undefined;
|
|
49
|
+
}>) | undefined;
|
|
50
|
+
};
|
|
6
51
|
/** Create the tool that lists active resource subscriptions for this conversation. */
|
|
7
|
-
export declare function createListResourceEventSubscriptionsTool(context: ToolRuntimeContext): import("./definition").AnyToolDefinition
|
|
52
|
+
export declare function createListResourceEventSubscriptionsTool(context: ToolRuntimeContext): Omit<import("./definition").AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
|
|
53
|
+
inputSchema: import("./definition").JsonSchemaObject;
|
|
54
|
+
outputSchema: import("./definition").JsonSchemaObject;
|
|
55
|
+
prepareArguments(args: unknown): Record<string, never>;
|
|
56
|
+
execute?: ((input: unknown, options: import("./definition").ToolExecuteOptions) => {
|
|
57
|
+
[x: string]: unknown;
|
|
58
|
+
ok: boolean;
|
|
59
|
+
status: "error" | "success";
|
|
60
|
+
target?: string | undefined;
|
|
61
|
+
data?: unknown;
|
|
62
|
+
truncated?: boolean | undefined;
|
|
63
|
+
continuation?: {
|
|
64
|
+
arguments: Record<string, unknown>;
|
|
65
|
+
reason?: string | undefined;
|
|
66
|
+
} | undefined;
|
|
67
|
+
error?: string | {
|
|
68
|
+
kind: string;
|
|
69
|
+
message: string;
|
|
70
|
+
retryable?: boolean | undefined;
|
|
71
|
+
} | undefined;
|
|
72
|
+
} | Promise<{
|
|
73
|
+
[x: string]: unknown;
|
|
74
|
+
ok: boolean;
|
|
75
|
+
status: "error" | "success";
|
|
76
|
+
target?: string | undefined;
|
|
77
|
+
data?: unknown;
|
|
78
|
+
truncated?: boolean | undefined;
|
|
79
|
+
continuation?: {
|
|
80
|
+
arguments: Record<string, unknown>;
|
|
81
|
+
reason?: string | undefined;
|
|
82
|
+
} | undefined;
|
|
83
|
+
error?: string | {
|
|
84
|
+
kind: string;
|
|
85
|
+
message: string;
|
|
86
|
+
retryable?: boolean | undefined;
|
|
87
|
+
} | undefined;
|
|
88
|
+
}>) | undefined;
|
|
89
|
+
};
|
|
8
90
|
/** Create the tool that cancels a current-conversation resource subscription. */
|
|
9
|
-
export declare function createCancelResourceEventSubscriptionTool(context: ToolRuntimeContext): import("./definition").AnyToolDefinition
|
|
91
|
+
export declare function createCancelResourceEventSubscriptionTool(context: ToolRuntimeContext): Omit<import("./definition").AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
|
|
92
|
+
inputSchema: import("./definition").JsonSchemaObject;
|
|
93
|
+
outputSchema: import("./definition").JsonSchemaObject;
|
|
94
|
+
prepareArguments(args: unknown): {
|
|
95
|
+
subscriptionId: string;
|
|
96
|
+
};
|
|
97
|
+
execute?: ((input: unknown, options: import("./definition").ToolExecuteOptions) => {
|
|
98
|
+
[x: string]: unknown;
|
|
99
|
+
ok: boolean;
|
|
100
|
+
status: "error" | "success";
|
|
101
|
+
target?: string | undefined;
|
|
102
|
+
data?: unknown;
|
|
103
|
+
truncated?: boolean | undefined;
|
|
104
|
+
continuation?: {
|
|
105
|
+
arguments: Record<string, unknown>;
|
|
106
|
+
reason?: string | undefined;
|
|
107
|
+
} | undefined;
|
|
108
|
+
error?: string | {
|
|
109
|
+
kind: string;
|
|
110
|
+
message: string;
|
|
111
|
+
retryable?: boolean | undefined;
|
|
112
|
+
} | undefined;
|
|
113
|
+
} | Promise<{
|
|
114
|
+
[x: string]: unknown;
|
|
115
|
+
ok: boolean;
|
|
116
|
+
status: "error" | "success";
|
|
117
|
+
target?: string | undefined;
|
|
118
|
+
data?: unknown;
|
|
119
|
+
truncated?: boolean | undefined;
|
|
120
|
+
continuation?: {
|
|
121
|
+
arguments: Record<string, unknown>;
|
|
122
|
+
reason?: string | undefined;
|
|
123
|
+
} | undefined;
|
|
124
|
+
error?: string | {
|
|
125
|
+
kind: string;
|
|
126
|
+
message: string;
|
|
127
|
+
retryable?: boolean | undefined;
|
|
128
|
+
} | undefined;
|
|
129
|
+
}>) | undefined;
|
|
130
|
+
};
|
|
@@ -1,2 +1,41 @@
|
|
|
1
1
|
/** Create the internal tool the model uses for sparse progress updates. */
|
|
2
|
-
export declare function createReportProgressTool(): import("../definition").AnyToolDefinition
|
|
2
|
+
export declare function createReportProgressTool(): Omit<import("../definition").AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
|
|
3
|
+
inputSchema: import("../definition").JsonSchemaObject;
|
|
4
|
+
outputSchema: import("../definition").JsonSchemaObject;
|
|
5
|
+
prepareArguments(args: unknown): {
|
|
6
|
+
message: string;
|
|
7
|
+
};
|
|
8
|
+
execute?: ((input: unknown, options: import("../definition").ToolExecuteOptions) => {
|
|
9
|
+
[x: string]: unknown;
|
|
10
|
+
ok: boolean;
|
|
11
|
+
status: "error" | "success";
|
|
12
|
+
target?: string | undefined;
|
|
13
|
+
data?: unknown;
|
|
14
|
+
truncated?: boolean | undefined;
|
|
15
|
+
continuation?: {
|
|
16
|
+
arguments: Record<string, unknown>;
|
|
17
|
+
reason?: string | undefined;
|
|
18
|
+
} | undefined;
|
|
19
|
+
error?: string | {
|
|
20
|
+
kind: string;
|
|
21
|
+
message: string;
|
|
22
|
+
retryable?: boolean | undefined;
|
|
23
|
+
} | undefined;
|
|
24
|
+
} | Promise<{
|
|
25
|
+
[x: string]: unknown;
|
|
26
|
+
ok: boolean;
|
|
27
|
+
status: "error" | "success";
|
|
28
|
+
target?: string | undefined;
|
|
29
|
+
data?: unknown;
|
|
30
|
+
truncated?: boolean | undefined;
|
|
31
|
+
continuation?: {
|
|
32
|
+
arguments: Record<string, unknown>;
|
|
33
|
+
reason?: string | undefined;
|
|
34
|
+
} | undefined;
|
|
35
|
+
error?: string | {
|
|
36
|
+
kind: string;
|
|
37
|
+
message: string;
|
|
38
|
+
retryable?: boolean | undefined;
|
|
39
|
+
} | undefined;
|
|
40
|
+
}>) | undefined;
|
|
41
|
+
};
|
|
@@ -1,2 +1,42 @@
|
|
|
1
1
|
/** Create the sandbox shell tool definition exposed to the agent. */
|
|
2
|
-
export declare function createBashTool(): import("../definition").AnyToolDefinition
|
|
2
|
+
export declare function createBashTool(): Omit<import("../definition").AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
|
|
3
|
+
inputSchema: import("../definition").JsonSchemaObject;
|
|
4
|
+
outputSchema: import("../definition").JsonSchemaObject;
|
|
5
|
+
prepareArguments(args: unknown): {
|
|
6
|
+
command: string;
|
|
7
|
+
timeoutMs?: number | undefined;
|
|
8
|
+
};
|
|
9
|
+
execute?: ((input: unknown, options: import("../definition").ToolExecuteOptions) => {
|
|
10
|
+
[x: string]: unknown;
|
|
11
|
+
ok: boolean;
|
|
12
|
+
status: "error" | "success";
|
|
13
|
+
target?: string | undefined;
|
|
14
|
+
data?: unknown;
|
|
15
|
+
truncated?: boolean | undefined;
|
|
16
|
+
continuation?: {
|
|
17
|
+
arguments: Record<string, unknown>;
|
|
18
|
+
reason?: string | undefined;
|
|
19
|
+
} | undefined;
|
|
20
|
+
error?: string | {
|
|
21
|
+
kind: string;
|
|
22
|
+
message: string;
|
|
23
|
+
retryable?: boolean | undefined;
|
|
24
|
+
} | undefined;
|
|
25
|
+
} | Promise<{
|
|
26
|
+
[x: string]: unknown;
|
|
27
|
+
ok: boolean;
|
|
28
|
+
status: "error" | "success";
|
|
29
|
+
target?: string | undefined;
|
|
30
|
+
data?: unknown;
|
|
31
|
+
truncated?: boolean | undefined;
|
|
32
|
+
continuation?: {
|
|
33
|
+
arguments: Record<string, unknown>;
|
|
34
|
+
reason?: string | undefined;
|
|
35
|
+
} | undefined;
|
|
36
|
+
error?: string | {
|
|
37
|
+
kind: string;
|
|
38
|
+
message: string;
|
|
39
|
+
retryable?: boolean | undefined;
|
|
40
|
+
} | undefined;
|
|
41
|
+
}>) | undefined;
|
|
42
|
+
};
|
|
@@ -51,5 +51,48 @@ export declare function editFile(params: {
|
|
|
51
51
|
path: string;
|
|
52
52
|
}): Promise<EditFileResult>;
|
|
53
53
|
/** Create the sandbox edit tool definition exposed to the agent. */
|
|
54
|
-
export declare function createEditFileTool(): import("../definition").AnyToolDefinition
|
|
54
|
+
export declare function createEditFileTool(): Omit<import("../definition").AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
|
|
55
|
+
inputSchema: import("../definition").JsonSchemaObject;
|
|
56
|
+
outputSchema: import("../definition").JsonSchemaObject;
|
|
57
|
+
prepareArguments(args: unknown): {
|
|
58
|
+
path: string;
|
|
59
|
+
edits: {
|
|
60
|
+
oldText: string;
|
|
61
|
+
newText: string;
|
|
62
|
+
}[];
|
|
63
|
+
};
|
|
64
|
+
execute?: ((input: unknown, options: import("../definition").ToolExecuteOptions) => {
|
|
65
|
+
[x: string]: unknown;
|
|
66
|
+
ok: boolean;
|
|
67
|
+
status: "error" | "success";
|
|
68
|
+
target?: string | undefined;
|
|
69
|
+
data?: unknown;
|
|
70
|
+
truncated?: boolean | undefined;
|
|
71
|
+
continuation?: {
|
|
72
|
+
arguments: Record<string, unknown>;
|
|
73
|
+
reason?: string | undefined;
|
|
74
|
+
} | undefined;
|
|
75
|
+
error?: string | {
|
|
76
|
+
kind: string;
|
|
77
|
+
message: string;
|
|
78
|
+
retryable?: boolean | undefined;
|
|
79
|
+
} | undefined;
|
|
80
|
+
} | Promise<{
|
|
81
|
+
[x: string]: unknown;
|
|
82
|
+
ok: boolean;
|
|
83
|
+
status: "error" | "success";
|
|
84
|
+
target?: string | undefined;
|
|
85
|
+
data?: unknown;
|
|
86
|
+
truncated?: boolean | undefined;
|
|
87
|
+
continuation?: {
|
|
88
|
+
arguments: Record<string, unknown>;
|
|
89
|
+
reason?: string | undefined;
|
|
90
|
+
} | undefined;
|
|
91
|
+
error?: string | {
|
|
92
|
+
kind: string;
|
|
93
|
+
message: string;
|
|
94
|
+
retryable?: boolean | undefined;
|
|
95
|
+
} | undefined;
|
|
96
|
+
}>) | undefined;
|
|
97
|
+
};
|
|
55
98
|
export {};
|
|
@@ -21,5 +21,46 @@ export declare function findFiles(params: {
|
|
|
21
21
|
pattern: string;
|
|
22
22
|
}): Promise<FindFilesResult>;
|
|
23
23
|
/** Create the sandbox file discovery tool definition exposed to the agent. */
|
|
24
|
-
export declare function createFindFilesTool(): import("../definition").AnyToolDefinition
|
|
24
|
+
export declare function createFindFilesTool(): Omit<import("../definition").AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
|
|
25
|
+
inputSchema: import("../definition").JsonSchemaObject;
|
|
26
|
+
outputSchema: import("../definition").JsonSchemaObject;
|
|
27
|
+
prepareArguments(args: unknown): {
|
|
28
|
+
pattern: string;
|
|
29
|
+
path?: string | undefined;
|
|
30
|
+
limit?: number | undefined;
|
|
31
|
+
};
|
|
32
|
+
execute?: ((input: unknown, options: import("../definition").ToolExecuteOptions) => {
|
|
33
|
+
[x: string]: unknown;
|
|
34
|
+
ok: boolean;
|
|
35
|
+
status: "error" | "success";
|
|
36
|
+
target?: string | undefined;
|
|
37
|
+
data?: unknown;
|
|
38
|
+
truncated?: boolean | undefined;
|
|
39
|
+
continuation?: {
|
|
40
|
+
arguments: Record<string, unknown>;
|
|
41
|
+
reason?: string | undefined;
|
|
42
|
+
} | undefined;
|
|
43
|
+
error?: string | {
|
|
44
|
+
kind: string;
|
|
45
|
+
message: string;
|
|
46
|
+
retryable?: boolean | undefined;
|
|
47
|
+
} | undefined;
|
|
48
|
+
} | Promise<{
|
|
49
|
+
[x: string]: unknown;
|
|
50
|
+
ok: boolean;
|
|
51
|
+
status: "error" | "success";
|
|
52
|
+
target?: string | undefined;
|
|
53
|
+
data?: unknown;
|
|
54
|
+
truncated?: boolean | undefined;
|
|
55
|
+
continuation?: {
|
|
56
|
+
arguments: Record<string, unknown>;
|
|
57
|
+
reason?: string | undefined;
|
|
58
|
+
} | undefined;
|
|
59
|
+
error?: string | {
|
|
60
|
+
kind: string;
|
|
61
|
+
message: string;
|
|
62
|
+
retryable?: boolean | undefined;
|
|
63
|
+
} | undefined;
|
|
64
|
+
}>) | undefined;
|
|
65
|
+
};
|
|
25
66
|
export {};
|
|
@@ -35,5 +35,50 @@ export declare function grepFiles(params: {
|
|
|
35
35
|
pattern: string;
|
|
36
36
|
}): Promise<GrepResult>;
|
|
37
37
|
/** Create the sandbox grep tool definition exposed to the agent. */
|
|
38
|
-
export declare function createGrepTool(): import("../definition").AnyToolDefinition
|
|
38
|
+
export declare function createGrepTool(): Omit<import("../definition").AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
|
|
39
|
+
inputSchema: import("../definition").JsonSchemaObject;
|
|
40
|
+
outputSchema: import("../definition").JsonSchemaObject;
|
|
41
|
+
prepareArguments(args: unknown): {
|
|
42
|
+
pattern: string;
|
|
43
|
+
path?: string | undefined;
|
|
44
|
+
glob?: string | undefined;
|
|
45
|
+
ignoreCase?: boolean | undefined;
|
|
46
|
+
literal?: boolean | undefined;
|
|
47
|
+
context?: number | undefined;
|
|
48
|
+
limit?: number | undefined;
|
|
49
|
+
};
|
|
50
|
+
execute?: ((input: unknown, options: import("../definition").ToolExecuteOptions) => {
|
|
51
|
+
[x: string]: unknown;
|
|
52
|
+
ok: boolean;
|
|
53
|
+
status: "error" | "success";
|
|
54
|
+
target?: string | undefined;
|
|
55
|
+
data?: unknown;
|
|
56
|
+
truncated?: boolean | undefined;
|
|
57
|
+
continuation?: {
|
|
58
|
+
arguments: Record<string, unknown>;
|
|
59
|
+
reason?: string | undefined;
|
|
60
|
+
} | undefined;
|
|
61
|
+
error?: string | {
|
|
62
|
+
kind: string;
|
|
63
|
+
message: string;
|
|
64
|
+
retryable?: boolean | undefined;
|
|
65
|
+
} | undefined;
|
|
66
|
+
} | Promise<{
|
|
67
|
+
[x: string]: unknown;
|
|
68
|
+
ok: boolean;
|
|
69
|
+
status: "error" | "success";
|
|
70
|
+
target?: string | undefined;
|
|
71
|
+
data?: unknown;
|
|
72
|
+
truncated?: boolean | undefined;
|
|
73
|
+
continuation?: {
|
|
74
|
+
arguments: Record<string, unknown>;
|
|
75
|
+
reason?: string | undefined;
|
|
76
|
+
} | undefined;
|
|
77
|
+
error?: string | {
|
|
78
|
+
kind: string;
|
|
79
|
+
message: string;
|
|
80
|
+
retryable?: boolean | undefined;
|
|
81
|
+
} | undefined;
|
|
82
|
+
}>) | undefined;
|
|
83
|
+
};
|
|
39
84
|
export {};
|