@shumai-one/shumai-transcode 0.4.2 → 0.4.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shumai-one/shumai-transcode",
3
- "version": "0.4.2",
3
+ "version": "0.4.4",
4
4
  "description": "Media transcoding worker for the shumai media workspace",
5
5
  "type": "module",
6
6
  "bin": {
@@ -12,27 +12,27 @@
12
12
  "prisma.config.ts"
13
13
  ],
14
14
  "dependencies": {
15
- "@prisma/client": "7.8.0",
16
- "@prisma/adapter-pg": "7.8.0",
17
- "pg": "8.21.0",
18
- "sharp": "0.34.5",
15
+ "@prisma/client": "7.10.0",
16
+ "@prisma/adapter-pg": "7.10.0",
17
+ "pg": "8.23.0",
18
+ "sharp": "0.35.4",
19
19
  "pino": "10.3.1",
20
20
  "pino-pretty": "13.1.3",
21
- "@temporalio/activity": "1.17.2",
22
- "@temporalio/client": "1.17.2",
23
- "@temporalio/worker": "1.17.2",
24
- "@temporalio/workflow": "1.17.2",
25
- "pdfkit": "0.19.1",
26
- "prisma": "7.8.0",
27
- "zod": "4.4.3"
21
+ "@temporalio/activity": "1.23.0",
22
+ "@temporalio/client": "1.23.0",
23
+ "@temporalio/worker": "1.23.0",
24
+ "@temporalio/workflow": "1.23.0",
25
+ "pdfkit": "0.20.1",
26
+ "prisma": "7.10.0",
27
+ "zod": "4.5.4"
28
28
  },
29
29
  "optionalDependencies": {
30
- "@shumai-one/shumai-transcode-darwin-arm64": "0.4.2",
31
- "@shumai-one/shumai-transcode-darwin-x64": "0.4.2",
32
- "@shumai-one/shumai-transcode-linux-arm64": "0.4.2",
33
- "@shumai-one/shumai-transcode-linux-x64": "0.4.2",
34
- "@shumai-one/shumai-transcode-win32-arm64": "0.4.2",
35
- "@shumai-one/shumai-transcode-win32-x64": "0.4.2"
30
+ "@shumai-one/shumai-transcode-darwin-arm64": "0.4.4",
31
+ "@shumai-one/shumai-transcode-darwin-x64": "0.4.4",
32
+ "@shumai-one/shumai-transcode-linux-arm64": "0.4.4",
33
+ "@shumai-one/shumai-transcode-linux-x64": "0.4.4",
34
+ "@shumai-one/shumai-transcode-win32-arm64": "0.4.4",
35
+ "@shumai-one/shumai-transcode-win32-x64": "0.4.4"
36
36
  },
37
37
  "repository": {
38
38
  "type": "git",
@@ -0,0 +1,17 @@
1
+ -- AlterTable
2
+ ALTER TABLE "assets" ADD COLUMN "agent_id" TEXT;
3
+
4
+ -- AlterTable
5
+ ALTER TABLE "audit_logs" ADD COLUMN "agent_id" TEXT;
6
+
7
+ -- CreateIndex
8
+ CREATE INDEX "assets_agent_id_idx" ON "assets"("agent_id");
9
+
10
+ -- CreateIndex
11
+ CREATE INDEX "audit_logs_agent_id_idx" ON "audit_logs"("agent_id");
12
+
13
+ -- AddForeignKey
14
+ ALTER TABLE "assets" ADD CONSTRAINT "assets_agent_id_fkey" FOREIGN KEY ("agent_id") REFERENCES "agents"("id") ON DELETE SET NULL ON UPDATE CASCADE;
15
+
16
+ -- AddForeignKey
17
+ ALTER TABLE "audit_logs" ADD CONSTRAINT "audit_logs_agent_id_fkey" FOREIGN KEY ("agent_id") REFERENCES "agents"("id") ON DELETE SET NULL ON UPDATE CASCADE;
@@ -0,0 +1,15 @@
1
+ -- Append 'delete_asset' to deniedTools of existing agents if not already present
2
+ UPDATE "agents"
3
+ SET "config" = jsonb_set(
4
+ "config"::jsonb,
5
+ '{deniedTools}',
6
+ CASE
7
+ WHEN "config"::jsonb ? 'deniedTools' AND jsonb_typeof("config"::jsonb->'deniedTools') = 'array' THEN
8
+ CASE
9
+ WHEN "config"::jsonb->'deniedTools' @> '["delete_asset"]'::jsonb THEN "config"::jsonb->'deniedTools'
10
+ ELSE ("config"::jsonb->'deniedTools') || '["delete_asset"]'::jsonb
11
+ END
12
+ ELSE
13
+ '["delete_asset"]'::jsonb
14
+ END
15
+ );
@@ -0,0 +1,2 @@
1
+ -- AlterTable
2
+ ALTER TABLE "assets" ADD COLUMN "upload_id" TEXT;
@@ -522,6 +522,7 @@ model Asset {
522
522
  sizeByte BigInt @default(0) @map("size_byte")
523
523
  status AssetStatus
524
524
  transcodeTaskId String? @map("transcode_task_id")
525
+ uploadId String? @map("upload_id")
525
526
  /// [MediaInfo]
526
527
  media Json?
527
528
  isDeleted Boolean @default(false) @map("is_deleted")
@@ -546,6 +547,9 @@ model Asset {
546
547
  creatorId String? @map("creator_id")
547
548
  creator User? @relation("UserToAsset", fields: [creatorId], references: [id])
548
549
 
550
+ agentId String? @map("agent_id")
551
+ agent Agent? @relation("AgentToAsset", fields: [agentId], references: [id], onDelete: SetNull)
552
+
549
553
  taskId String? @map("task_id")
550
554
  task Task? @relation("TaskToAsset", fields: [taskId], references: [id])
551
555
 
@@ -576,6 +580,7 @@ model Asset {
576
580
  @@index([sortIndex])
577
581
  @@index([isDeleted])
578
582
  @@index([deletedAt])
583
+ @@index([agentId])
579
584
  @@index([name], name: "assets_name_idx")
580
585
  @@index([nameNgram], type: Gin)
581
586
  @@unique([parentId, targetId], name: "parentIdTargetId")
@@ -848,6 +853,8 @@ model Agent {
848
853
  agentSessions AgentSession[]
849
854
  skills AgentSkill[]
850
855
  mcpServers AgentMcpServer[]
856
+ assets Asset[] @relation("AgentToAsset")
857
+ auditLogs AuditLog[] @relation("AgentToAuditLog")
851
858
 
852
859
  @@map("agents")
853
860
  }
@@ -1083,16 +1090,19 @@ model AuditLog {
1083
1090
  action String
1084
1091
  teamId String @map("team_id")
1085
1092
  userId String? @map("user_id")
1093
+ agentId String? @map("agent_id")
1086
1094
  projectId String? @map("project_id")
1087
1095
  itemId String? @map("item_id")
1088
1096
  createdAt DateTime @default(now()) @map("created_at")
1089
1097
 
1090
1098
  team Team @relation("TeamToAuditLog", fields: [teamId], references: [id], onDelete: Cascade)
1091
1099
  user User? @relation("UserToAuditLog", fields: [userId], references: [id], onDelete: SetNull)
1100
+ agent Agent? @relation("AgentToAuditLog", fields: [agentId], references: [id], onDelete: SetNull)
1092
1101
  project Project? @relation("ProjectToAuditLog", fields: [projectId], references: [id], onDelete: SetNull)
1093
1102
 
1094
1103
  @@index([teamId, id(sort: Desc)])
1095
1104
  @@index([userId])
1105
+ @@index([agentId])
1096
1106
  @@index([action])
1097
1107
  @@index([itemId])
1098
1108
  @@map("audit_logs")