Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(mcp): support thread attachments #8700

Closedjuliusmarmingewants to merge 13 commits intot3code/codex-turn-mapping fromagents/mcp-queue-inputs/attachmentsopened View on GitHub

Showing 34 changed files with 195 additions and 0 deletions (loading 31).

x
0 of 34 viewed, 34 left
129 additions and 0 deletionsapps/server/src/mcp/toolkits/attachment/attachment.integration.test.tsAdded
View file
@@ -0,0 +1,129 @@
+import * as NodeServices from "@effect/platform-node/NodeServices";
+import { describe, expect, it } from "@effect/vitest";
+import {
+ AttachmentMcpDiscardUploadResult,
+ AttachmentMcpPrepareUploadResult,
+ EnvironmentId,
+ ProviderInstanceId,
+ ThreadId,
+} from "@t3tools/contracts";
+import * as Effect from "effect/Effect";
+import * as Layer from "effect/Layer";
+import * as Schema from "effect/Schema";
+import { McpSchema, McpServer } from "effect/unstable/ai";
+​
+import * as ServerSecretStore from "../../../auth/ServerSecretStore.ts";
+import {
+ storeAttachmentUpload,
+ validateAttachmentUploadToken,
+} from "../../../assets/AttachmentUpload.ts";
+import * as ServerConfig from "../../../config.ts";
+import * as McpHttpServer from "../../McpHttpServer.ts";
+import * as McpInvocationContext from "../../McpInvocationContext.ts";
+​
+const invocation: McpInvocationContext.McpInvocationScope = {
+ environmentId: EnvironmentId.make("environment-attachment-mcp"),
+ threadId: ThreadId.make("thread-attachment-mcp"),
+ providerSessionId: "provider-session-attachment-mcp",
+ providerInstanceId: ProviderInstanceId.make("codex"),
+ capabilities: new Set(["orchestration"]),
+ issuedAt: 1,