feat(platform): checkpoint current implementation state
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { SystemRole } from "@capakraken/shared";
|
||||
import type { TRPCContext } from "../../trpc.js";
|
||||
import type { ToolContext, ToolDef, ToolExecutor } from "./shared.js";
|
||||
import { withToolAccess, type ToolContext, type ToolDef, type ToolExecutor } from "./shared.js";
|
||||
|
||||
type AssistantToolErrorResult = { error: string };
|
||||
|
||||
@@ -143,7 +144,7 @@ type NotificationsTasksDeps = {
|
||||
) => AssistantToolErrorResult | null;
|
||||
};
|
||||
|
||||
export const notificationInboxToolDefinitions: ToolDef[] = [
|
||||
export const notificationInboxToolDefinitions: ToolDef[] = withToolAccess([
|
||||
{
|
||||
type: "function",
|
||||
function: {
|
||||
@@ -207,9 +208,13 @@ export const notificationInboxToolDefinitions: ToolDef[] = [
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
||||
], {
|
||||
create_notification: {
|
||||
allowedSystemRoles: [SystemRole.ADMIN, SystemRole.MANAGER],
|
||||
},
|
||||
});
|
||||
|
||||
export const notificationTaskToolDefinitions: ToolDef[] = [
|
||||
export const notificationTaskToolDefinitions: ToolDef[] = withToolAccess([
|
||||
{
|
||||
type: "function",
|
||||
function: {
|
||||
@@ -444,7 +449,23 @@ export const notificationTaskToolDefinitions: ToolDef[] = [
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
||||
], {
|
||||
create_task_for_user: {
|
||||
allowedSystemRoles: [SystemRole.ADMIN, SystemRole.MANAGER],
|
||||
},
|
||||
assign_task: {
|
||||
allowedSystemRoles: [SystemRole.ADMIN, SystemRole.MANAGER],
|
||||
},
|
||||
send_broadcast: {
|
||||
allowedSystemRoles: [SystemRole.ADMIN, SystemRole.MANAGER],
|
||||
},
|
||||
list_broadcasts: {
|
||||
allowedSystemRoles: [SystemRole.ADMIN, SystemRole.MANAGER],
|
||||
},
|
||||
get_broadcast_detail: {
|
||||
allowedSystemRoles: [SystemRole.ADMIN, SystemRole.MANAGER],
|
||||
},
|
||||
});
|
||||
|
||||
export function createNotificationsTasksExecutors(
|
||||
deps: NotificationsTasksDeps,
|
||||
|
||||
Reference in New Issue
Block a user