feat(platform): checkpoint current implementation state

This commit is contained in:
2026-04-01 07:42:03 +02:00
parent 3e53471f05
commit 8c5be51251
125 changed files with 10269 additions and 17808 deletions
@@ -6,8 +6,16 @@ export function createToolContext(
db: Record<string, unknown>,
userRole: SystemRole = SystemRole.USER,
): ToolContext {
const dbWithTransaction = "$transaction" in db
? db
: {
...db,
$transaction: async <T>(callback: (tx: ToolContext["db"]) => Promise<T>) =>
callback(db as ToolContext["db"]),
};
return {
db: db as ToolContext["db"],
db: dbWithTransaction as ToolContext["db"],
userId: "user_1",
userRole,
permissions: new Set(),