Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(server): every T3 MCP tool declares who may call it #16335

Mergedjuliusmarmingemerged 14 commits intomain fromrefs/pull/16335/headmerged by juliusmarminge View on GitHub

Showing 48 changed files with 77 additions and 71 deletions (loading 45).

x
0 of 48 viewed, 48 left
51 additions and 59 deletionsapps/server/src/mcp/toolkits/attachment/handlers.tsModified
View file
@@ -3,12 +3,8 @@
import * as Upload from "../../../assets/AttachmentUpload.ts";
import * as Claims from "../../../orchestration-v2/AttachmentClaims.ts";
import * as ThreadMessageIntake from "../../../orchestration-v2/ThreadMessageIntake.ts";
-import {
- newCommandId,
- readMutationCaller,
- readWritableThread,
- unavailable,
-} from "../../threadAccess.ts";
+import * as McpToolAccess from "../../McpToolAccess.ts";
+import { newCommandId, readThread, unavailable } from "../../threadAccess.ts";
import { AttachmentToolkit } from "./tools.ts";
​
export function resolveAttachmentReferences(
@@ -31,57 +27,53 @@
});
​
-export const layer = AttachmentToolkit.toLayer({
- t3_attachment_prepare_upload: (input) =>
- Effect.gen(function* () {
- yield* readMutationCaller();
- return yield* Upload.issueAttachmentUploadUrl(input.upload).pipe(
- Effect.mapError(unavailable),
- );
- }),
- t3_attachment_discard: (input) =>
- Effect.gen(function* () {