@shumai-one/shumai-transcode 0.3.5 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/{chunk-ehbk2rm4.js → chunk-4gv9dx9w.js} +1 -1
- package/bin/shumai-transcode-app.js +95 -27
- package/package.json +7 -7
- package/prisma/migrations/20260810025327_add_mcp_servers/migration.sql +71 -0
- package/prisma/migrations/20260810074554_mcp_server_cleanup/migration.sql +12 -0
- package/prisma/migrations/20260810124707_add_mcp_server_instructions/migration.sql +2 -0
- package/prisma/migrations/20260813022501_backfill_autofill_source_in_config/migration.sql +8 -0
- package/prisma/migrations/20260813022502_drop_legacy_autofill_columns/migration.sql +12 -0
- package/prisma/migrations/20260813122613_add_network_sandbox_enabled_column/migration.sql +2 -0
- package/prisma/migrations/20260813122618_migrate_legacy_sandboxes_enabled/migration.sql +2 -0
- package/prisma/schema.prisma +77 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shumai-one/shumai-transcode",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.7",
|
|
4
4
|
"description": "Media transcoding worker for the shumai media workspace",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
"zod": "4.4.3"
|
|
28
28
|
},
|
|
29
29
|
"optionalDependencies": {
|
|
30
|
-
"@shumai-one/shumai-transcode-darwin-arm64": "0.3.
|
|
31
|
-
"@shumai-one/shumai-transcode-darwin-x64": "0.3.
|
|
32
|
-
"@shumai-one/shumai-transcode-linux-arm64": "0.3.
|
|
33
|
-
"@shumai-one/shumai-transcode-linux-x64": "0.3.
|
|
34
|
-
"@shumai-one/shumai-transcode-win32-arm64": "0.3.
|
|
35
|
-
"@shumai-one/shumai-transcode-win32-x64": "0.3.
|
|
30
|
+
"@shumai-one/shumai-transcode-darwin-arm64": "0.3.7",
|
|
31
|
+
"@shumai-one/shumai-transcode-darwin-x64": "0.3.7",
|
|
32
|
+
"@shumai-one/shumai-transcode-linux-arm64": "0.3.7",
|
|
33
|
+
"@shumai-one/shumai-transcode-linux-x64": "0.3.7",
|
|
34
|
+
"@shumai-one/shumai-transcode-win32-arm64": "0.3.7",
|
|
35
|
+
"@shumai-one/shumai-transcode-win32-x64": "0.3.7"
|
|
36
36
|
},
|
|
37
37
|
"repository": {
|
|
38
38
|
"type": "git",
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
-- CreateEnum
|
|
2
|
+
CREATE TYPE "McpTransport" AS ENUM ('streamable_http', 'sse');
|
|
3
|
+
|
|
4
|
+
-- CreateTable
|
|
5
|
+
CREATE TABLE "mcp_servers" (
|
|
6
|
+
"id" TEXT NOT NULL,
|
|
7
|
+
"name" TEXT NOT NULL,
|
|
8
|
+
"url" TEXT NOT NULL,
|
|
9
|
+
"transport" "McpTransport" NOT NULL DEFAULT 'streamable_http',
|
|
10
|
+
"authConfig" JSONB DEFAULT '{}',
|
|
11
|
+
"config" JSONB DEFAULT '{}',
|
|
12
|
+
"enabled" BOOLEAN NOT NULL DEFAULT true,
|
|
13
|
+
"permission" "TeamMemberRole" NOT NULL DEFAULT 'reviewer',
|
|
14
|
+
"tools" JSONB DEFAULT '[]',
|
|
15
|
+
"status" TEXT NOT NULL DEFAULT 'not_connected',
|
|
16
|
+
"last_error" TEXT,
|
|
17
|
+
"last_connected_at" TIMESTAMP(3),
|
|
18
|
+
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
19
|
+
"updated_at" TIMESTAMP(3) NOT NULL,
|
|
20
|
+
"team_id" TEXT NOT NULL,
|
|
21
|
+
|
|
22
|
+
CONSTRAINT "mcp_servers_pkey" PRIMARY KEY ("id")
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
-- CreateTable
|
|
26
|
+
CREATE TABLE "agent_mcp_servers" (
|
|
27
|
+
"id" TEXT NOT NULL,
|
|
28
|
+
"agent_id" TEXT NOT NULL,
|
|
29
|
+
"mcp_server_id" TEXT NOT NULL,
|
|
30
|
+
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
31
|
+
"updated_at" TIMESTAMP(3) NOT NULL,
|
|
32
|
+
|
|
33
|
+
CONSTRAINT "agent_mcp_servers_pkey" PRIMARY KEY ("id")
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
-- CreateTable
|
|
37
|
+
CREATE TABLE "mcp_server_credentials" (
|
|
38
|
+
"id" TEXT NOT NULL,
|
|
39
|
+
"server_id" TEXT NOT NULL,
|
|
40
|
+
"server_url" TEXT NOT NULL,
|
|
41
|
+
"tokens" JSONB,
|
|
42
|
+
"clientInfo" JSONB,
|
|
43
|
+
"code_verifier" TEXT,
|
|
44
|
+
"oauth_state" TEXT,
|
|
45
|
+
"pending_auth" JSONB,
|
|
46
|
+
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
47
|
+
"updated_at" TIMESTAMP(3) NOT NULL,
|
|
48
|
+
|
|
49
|
+
CONSTRAINT "mcp_server_credentials_pkey" PRIMARY KEY ("id")
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
-- CreateIndex
|
|
53
|
+
CREATE UNIQUE INDEX "mcp_servers_team_id_name_key" ON "mcp_servers"("team_id", "name");
|
|
54
|
+
|
|
55
|
+
-- CreateIndex
|
|
56
|
+
CREATE UNIQUE INDEX "agent_mcp_servers_agent_id_mcp_server_id_key" ON "agent_mcp_servers"("agent_id", "mcp_server_id");
|
|
57
|
+
|
|
58
|
+
-- CreateIndex
|
|
59
|
+
CREATE UNIQUE INDEX "mcp_server_credentials_server_id_key" ON "mcp_server_credentials"("server_id");
|
|
60
|
+
|
|
61
|
+
-- AddForeignKey
|
|
62
|
+
ALTER TABLE "mcp_servers" ADD CONSTRAINT "mcp_servers_team_id_fkey" FOREIGN KEY ("team_id") REFERENCES "teams"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
63
|
+
|
|
64
|
+
-- AddForeignKey
|
|
65
|
+
ALTER TABLE "agent_mcp_servers" ADD CONSTRAINT "agent_mcp_servers_agent_id_fkey" FOREIGN KEY ("agent_id") REFERENCES "agents"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
66
|
+
|
|
67
|
+
-- AddForeignKey
|
|
68
|
+
ALTER TABLE "agent_mcp_servers" ADD CONSTRAINT "agent_mcp_servers_mcp_server_id_fkey" FOREIGN KEY ("mcp_server_id") REFERENCES "mcp_servers"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
69
|
+
|
|
70
|
+
-- AddForeignKey
|
|
71
|
+
ALTER TABLE "mcp_server_credentials" ADD CONSTRAINT "mcp_server_credentials_server_id_fkey" FOREIGN KEY ("server_id") REFERENCES "mcp_servers"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- You are about to drop the column `enabled` on the `mcp_servers` table. All the data in the column will be lost.
|
|
5
|
+
|
|
6
|
+
*/
|
|
7
|
+
-- DropIndex
|
|
8
|
+
DROP INDEX "mcp_servers_team_id_name_key";
|
|
9
|
+
|
|
10
|
+
-- AlterTable
|
|
11
|
+
ALTER TABLE "mcp_servers" DROP COLUMN "enabled",
|
|
12
|
+
ADD COLUMN "description" TEXT;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
-- Backfill autofillSource in config JSON where ai_autofill is true
|
|
2
|
+
UPDATE "metadata_fields"
|
|
3
|
+
SET "config" = jsonb_set(COALESCE("config", '{}'::jsonb), '{autofillSource}', '"CONTENT"')
|
|
4
|
+
WHERE "ai_autofill" = true;
|
|
5
|
+
|
|
6
|
+
UPDATE "metadata_fields"
|
|
7
|
+
SET "config" = jsonb_set(COALESCE("config", '{}'::jsonb), '{autofillSource}', '"NONE"')
|
|
8
|
+
WHERE "ai_autofill" = false OR "ai_autofill" IS NULL;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- You are about to drop the column `autofill_context` on the `assets` table. All the data in the column will be lost.
|
|
5
|
+
- You are about to drop the column `ai_autofill` on the `metadata_fields` table. All the data in the column will be lost.
|
|
6
|
+
|
|
7
|
+
*/
|
|
8
|
+
-- AlterTable
|
|
9
|
+
ALTER TABLE "assets" DROP COLUMN "autofill_context";
|
|
10
|
+
|
|
11
|
+
-- AlterTable
|
|
12
|
+
ALTER TABLE "metadata_fields" DROP COLUMN "ai_autofill";
|
package/prisma/schema.prisma
CHANGED
|
@@ -252,6 +252,7 @@ model Team {
|
|
|
252
252
|
userMetadata UserMetadata[] @relation("TeamToUserMetadata")
|
|
253
253
|
providers Provider[] @relation("TeamToProvider")
|
|
254
254
|
skills Skill[] @relation("TeamToSkill")
|
|
255
|
+
mcpServers McpServer[] @relation("TeamToMcpServer")
|
|
255
256
|
sandbox Sandbox? @relation("TeamToSandbox")
|
|
256
257
|
agents Agent[] @relation("TeamToAgent")
|
|
257
258
|
aiUsages AiUsage[] @relation("TeamToAiUsage")
|
|
@@ -262,11 +263,12 @@ model Team {
|
|
|
262
263
|
}
|
|
263
264
|
|
|
264
265
|
model Sandbox {
|
|
265
|
-
id
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
266
|
+
id String @id @default(ulid())
|
|
267
|
+
networkSandboxEnabled Boolean @default(false) @map("network_sandbox_enabled")
|
|
268
|
+
allowedDomains String[] @default(["npmjs.org", "*.npmjs.org", "registry.npmjs.org", "registry.yarnpkg.com", "pypi.org", "*.pypi.org", "github.com", "*.github.com", "api.github.com", "raw.githubusercontent.com"])
|
|
269
|
+
pendingDomains String[] @default([]) @map("pending_domains")
|
|
270
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
271
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
270
272
|
|
|
271
273
|
teamId String @unique @map("team_id")
|
|
272
274
|
team Team @relation("TeamToSandbox", fields: [teamId], references: [id], onDelete: Cascade)
|
|
@@ -449,7 +451,6 @@ model Asset {
|
|
|
449
451
|
transcodeTaskId String? @map("transcode_task_id")
|
|
450
452
|
/// [MediaInfo]
|
|
451
453
|
media Json?
|
|
452
|
-
autofillContext String? @map("autofill_context")
|
|
453
454
|
isDeleted Boolean @default(false) @map("is_deleted")
|
|
454
455
|
deletedAt DateTime? @map("deleted_at")
|
|
455
456
|
sortIndex String? @map("sort_index")
|
|
@@ -621,9 +622,8 @@ model MetadataField {
|
|
|
621
622
|
scope MetadataFieldScope?
|
|
622
623
|
/// [FieldConfig]
|
|
623
624
|
config Json?
|
|
624
|
-
readOnly
|
|
625
|
-
|
|
626
|
-
description String @default("")
|
|
625
|
+
readOnly Boolean @default(false) @map("read_only")
|
|
626
|
+
description String @default("")
|
|
627
627
|
|
|
628
628
|
teamId String? @map("team_id")
|
|
629
629
|
team Team? @relation("TeamToMetadataField", fields: [teamId], references: [id])
|
|
@@ -754,6 +754,7 @@ model Agent {
|
|
|
754
754
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
755
755
|
agentSessions AgentSession[]
|
|
756
756
|
skills AgentSkill[]
|
|
757
|
+
mcpServers AgentMcpServer[]
|
|
757
758
|
|
|
758
759
|
@@map("agents")
|
|
759
760
|
}
|
|
@@ -771,6 +772,73 @@ model AgentSkill {
|
|
|
771
772
|
@@map("agent_skills")
|
|
772
773
|
}
|
|
773
774
|
|
|
775
|
+
model McpServer {
|
|
776
|
+
id String @id @default(ulid())
|
|
777
|
+
name String
|
|
778
|
+
description String?
|
|
779
|
+
instructions String?
|
|
780
|
+
url String
|
|
781
|
+
transport McpTransport @default(streamable_http)
|
|
782
|
+
/// [McpServerAuthConfig]
|
|
783
|
+
authConfig Json? @default("{}")
|
|
784
|
+
/// [McpServerConfig]
|
|
785
|
+
config Json? @default("{}")
|
|
786
|
+
permission TeamMemberRole @default(reviewer)
|
|
787
|
+
/// [McpToolInfo[]]
|
|
788
|
+
tools Json? @default("[]")
|
|
789
|
+
status String @default("not_connected")
|
|
790
|
+
lastError String? @map("last_error")
|
|
791
|
+
lastConnectedAt DateTime? @map("last_connected_at")
|
|
792
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
793
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
794
|
+
|
|
795
|
+
teamId String @map("team_id")
|
|
796
|
+
team Team @relation("TeamToMcpServer", fields: [teamId], references: [id], onDelete: Cascade)
|
|
797
|
+
|
|
798
|
+
credential McpServerCredential?
|
|
799
|
+
agentMcpServers AgentMcpServer[]
|
|
800
|
+
|
|
801
|
+
@@map("mcp_servers")
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
// Join table: which agents get which MCP servers (mirrors AgentSkill).
|
|
805
|
+
model AgentMcpServer {
|
|
806
|
+
id String @id @default(ulid())
|
|
807
|
+
agentId String @map("agent_id")
|
|
808
|
+
agent Agent @relation(fields: [agentId], references: [id], onDelete: Cascade)
|
|
809
|
+
mcpServerId String @map("mcp_server_id")
|
|
810
|
+
mcpServer McpServer @relation(fields: [mcpServerId], references: [id], onDelete: Cascade)
|
|
811
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
812
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
813
|
+
|
|
814
|
+
@@unique([agentId, mcpServerId])
|
|
815
|
+
@@map("agent_mcp_servers")
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
model McpServerCredential {
|
|
819
|
+
id String @id @default(ulid())
|
|
820
|
+
serverId String @unique @map("server_id")
|
|
821
|
+
server McpServer @relation(fields: [serverId], references: [id], onDelete: Cascade)
|
|
822
|
+
serverUrl String @map("server_url")
|
|
823
|
+
/// [McpStoredTokens]
|
|
824
|
+
tokens Json?
|
|
825
|
+
/// [McpStoredClientInfo]
|
|
826
|
+
clientInfo Json?
|
|
827
|
+
codeVerifier String? @map("code_verifier")
|
|
828
|
+
oauthState String? @map("oauth_state")
|
|
829
|
+
/// [McpPendingAuth]
|
|
830
|
+
pendingAuth Json? @map("pending_auth")
|
|
831
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
832
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
833
|
+
|
|
834
|
+
@@map("mcp_server_credentials")
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
enum McpTransport {
|
|
838
|
+
streamable_http
|
|
839
|
+
sse
|
|
840
|
+
}
|
|
841
|
+
|
|
774
842
|
model AgentSession {
|
|
775
843
|
id String @id @default(ulid())
|
|
776
844
|
agentId String @map("agent_id")
|