fix: align discussion workspace and tool schemas
This commit is contained in:
@@ -13,6 +13,7 @@ type ToolDeps = {
|
||||
originChannelId: string;
|
||||
initiatorAgentId: string;
|
||||
initiatorSessionId: string;
|
||||
initiatorWorkspaceRoot?: string;
|
||||
discussGuide: string;
|
||||
}) => Promise<unknown>;
|
||||
handleCallback: (params: {
|
||||
@@ -119,6 +120,7 @@ export function registerDirigentTools(deps: ToolDeps): void {
|
||||
originChannelId: callbackChannelId,
|
||||
initiatorAgentId: String((params.__agentId as string | undefined) || ""),
|
||||
initiatorSessionId: String((params.__sessionKey as string | undefined) || ""),
|
||||
initiatorWorkspaceRoot: typeof params.__workspaceRoot === "string" ? params.__workspaceRoot : undefined,
|
||||
discussGuide,
|
||||
});
|
||||
}
|
||||
@@ -161,7 +163,7 @@ export function registerDirigentTools(deps: ToolDeps): void {
|
||||
api.registerTool({
|
||||
name: "dirigent_discord_control",
|
||||
description: "Create/update Discord private channels using the configured Discord bot token",
|
||||
inputSchema: {
|
||||
parameters: {
|
||||
type: "object",
|
||||
additionalProperties: false,
|
||||
properties: {
|
||||
@@ -194,6 +196,7 @@ export function registerDirigentTools(deps: ToolDeps): void {
|
||||
...(params as Record<string, unknown>),
|
||||
__agentId: ctx?.agentId,
|
||||
__sessionKey: ctx?.sessionKey,
|
||||
__workspaceRoot: ctx?.workspaceRoot,
|
||||
};
|
||||
return executeDiscordAction(params.action as DiscordControlAction, nextParams);
|
||||
},
|
||||
@@ -202,7 +205,7 @@ export function registerDirigentTools(deps: ToolDeps): void {
|
||||
api.registerTool({
|
||||
name: "discuss-callback",
|
||||
description: "Close a discussion channel and notify the origin work channel with the discussion summary path",
|
||||
inputSchema: {
|
||||
parameters: {
|
||||
type: "object",
|
||||
additionalProperties: false,
|
||||
properties: {
|
||||
|
||||
Reference in New Issue
Block a user