@shumai-one/shumai 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-0jkqmbcx.js +2 -0
- package/bin/{chunk-vzb2b89p.js → chunk-0t8q76ac.js} +1 -1
- package/bin/chunk-0xern7e4.js +1 -0
- package/bin/{chunk-d4zx3r12.js → chunk-0ycwr0kb.js} +1 -1
- package/bin/{chunk-8vc1m0kw.js → chunk-0yngn45x.js} +2 -2
- package/bin/{chunk-8fsrs7mh.js → chunk-1khzycf9.js} +1 -1
- package/bin/{chunk-c5esphve.js → chunk-1sqz0va1.js} +2 -2
- package/bin/{chunk-x2z5zz01.js → chunk-1xzc6z02.js} +1 -1
- package/bin/{chunk-3ydjrkbd.js → chunk-2086rsb2.js} +1 -1
- package/bin/{chunk-8vvr1ez5.js → chunk-260wywfb.js} +1 -1
- package/bin/{chunk-n67rfv86.js → chunk-2mqqghrz.js} +2 -2
- package/bin/{chunk-qm9w9fcv.js → chunk-2xmsrq7f.js} +2 -2
- package/bin/{chunk-t58kqafx.js → chunk-38g3s1f3.js} +2 -2
- package/bin/{chunk-th07gms7.js → chunk-3dx0p1ge.js} +1 -1
- package/bin/{chunk-f7fevgv2.js → chunk-3kqdgddm.js} +2 -2
- package/bin/{chunk-arxd4qb9.js → chunk-3xzgddev.js} +1 -1
- package/bin/{chunk-xt9n0y9a.js → chunk-48nzw50r.js} +1 -1
- package/bin/{chunk-8skgcmxm.js → chunk-4bn9eb9h.js} +1 -1
- package/bin/chunk-4egayx81.js +2 -0
- package/bin/{chunk-fw5k0xrc.js → chunk-4rbzswqs.js} +2 -2
- package/bin/{chunk-3mprq5kb.js → chunk-503qq6sa.js} +2 -2
- package/bin/{chunk-xnzyt0kq.js → chunk-50keqtz9.js} +1 -1
- package/bin/{chunk-4rz2105a.js → chunk-5gtew41y.js} +1 -1
- package/bin/chunk-60hpa5kf.js +3 -0
- package/bin/{chunk-6vn44e4d.js → chunk-69tt1pvr.js} +2 -2
- package/bin/{chunk-0bbhm7dp.js → chunk-6fv38qdc.js} +2 -2
- package/bin/{chunk-54hmgj96.js → chunk-6v39c8eg.js} +2 -2
- package/bin/{chunk-q0znwxfe.js → chunk-6zs49mef.js} +1 -1
- package/bin/{chunk-c2a5x1pk.js → chunk-7872prvg.js} +1 -1
- package/bin/{chunk-p3k6nzhe.js → chunk-7hnw6y6d.js} +2 -2
- package/bin/{chunk-g5mpp3nc.js → chunk-7k3ccca6.js} +1 -1
- package/bin/chunk-815ezj20.js +1 -0
- package/bin/{chunk-bg10gwm1.js → chunk-81tb4v5v.js} +2 -2
- package/bin/{chunk-s0g0bc6t.js → chunk-83k0wa5k.js} +2 -2
- package/bin/chunk-85eg9xqx.js +1 -0
- package/bin/{chunk-gwxzjc0m.js → chunk-86aagej8.js} +1 -1
- package/bin/{chunk-r9s1zs4g.js → chunk-87wqbn4g.js} +2 -2
- package/bin/chunk-8y1v9dm9.js +2 -0
- package/bin/{chunk-97y52q3a.js → chunk-98j2z6he.js} +3 -3
- package/bin/chunk-9gq9782d.js +1 -0
- package/bin/{chunk-wg5tjyj9.js → chunk-9gzy30zm.js} +2 -2
- package/bin/{chunk-nh4tzzn8.js → chunk-9nyhmtp9.js} +2 -2
- package/bin/{chunk-7jkvjm4x.js → chunk-9s02m95j.js} +2 -2
- package/bin/{chunk-7w2tx08e.js → chunk-9xhnmnnb.js} +2 -2
- package/bin/{chunk-vvr179pz.js → chunk-a0k1b4sq.js} +1 -1
- package/bin/chunk-adekdctx.css +1 -0
- package/bin/{chunk-3w9vybrh.js → chunk-af6wbhkv.js} +2 -2
- package/bin/{chunk-p33nq4pp.js → chunk-b3jh3hf1.js} +2 -2
- package/bin/chunk-b8v7jvkb.js +6 -0
- package/bin/{chunk-7mkk8ahk.js → chunk-bancgvrc.js} +2 -2
- package/bin/{chunk-fq6emqwq.js → chunk-br5xkaf7.js} +3 -3
- package/bin/chunk-bv88se28.css +1 -0
- package/bin/{chunk-17bewdr0.js → chunk-cqq8e3hc.js} +2 -2
- package/bin/{chunk-gd1x3rgn.js → chunk-dej1gq35.js} +1 -1
- package/bin/{chunk-sx1neqgr.js → chunk-dv1zpd2p.js} +2 -2
- package/bin/{chunk-fnkrzqrn.js → chunk-eetrc0j1.js} +2 -2
- package/bin/{chunk-afzc5eae.js → chunk-esrtafz0.js} +1 -1
- package/bin/{chunk-8ttfy5yy.js → chunk-eztggp8r.js} +1 -1
- package/bin/{chunk-f70xdh07.js → chunk-f2j2cqd1.js} +2 -2
- package/bin/{chunk-bv642x5z.js → chunk-fcs4v6jq.js} +2 -2
- package/bin/{chunk-wknqst3v.js → chunk-ftc48rbb.js} +3 -3
- package/bin/{chunk-7zdmpbt6.js → chunk-g60v3jc1.js} +1 -1
- package/bin/chunk-gf5ds9r9.js +2 -0
- package/bin/{chunk-5r55htaw.js → chunk-gjdmnfms.js} +1 -1
- package/bin/{chunk-kn4tnhbw.js → chunk-gjn3w26y.js} +2 -2
- package/bin/{chunk-fgda7ncw.js → chunk-h9emz0zb.js} +2 -2
- package/bin/chunk-h9k2atte.js +1 -0
- package/bin/{chunk-w8vk30ze.js → chunk-hqkmdp31.js} +2 -2
- package/bin/{chunk-4b8ms2ct.js → chunk-jszpvg8e.js} +2 -2
- package/bin/{chunk-b93djch5.js → chunk-k48y9e5s.js} +1 -1
- package/bin/{chunk-rek85wwv.js → chunk-karn564z.js} +2 -2
- package/bin/chunk-kkq4wvnc.js +1 -0
- package/bin/{chunk-ks8deg42.js → chunk-kpn9d97x.js} +1 -1
- package/bin/chunk-ksx113sp.js +1 -0
- package/bin/chunk-m6a4rzdt.js +62 -0
- package/bin/chunk-mw8f8ngt.js +7 -0
- package/bin/{chunk-8mzg29m4.js → chunk-n4gghgrj.js} +2 -2
- package/bin/chunk-n76r6s9k.js +2 -0
- package/bin/{chunk-xqkwpr7s.js → chunk-nvjp2rnh.js} +2 -2
- package/bin/{chunk-fcvtv783.js → chunk-p4c4z0f2.js} +1 -1
- package/bin/{chunk-v4re49f5.js → chunk-ptw49k86.js} +1 -1
- package/bin/{chunk-8na8a41a.js → chunk-qcqw7wnv.js} +2 -2
- package/bin/{chunk-vpq224tm.js → chunk-qdycy714.js} +1 -1
- package/bin/{chunk-2jfbxefd.js → chunk-qh9rz2ee.js} +6 -6
- package/bin/{chunk-8hq6sn31.js → chunk-qmpph1gt.js} +2 -2
- package/bin/{chunk-hk7a2mgn.js → chunk-qy93r7tm.js} +2 -2
- package/bin/{chunk-d1zpcags.js → chunk-r5dv0rfv.js} +2 -2
- package/bin/{chunk-avvzqqk2.js → chunk-rfyaphas.js} +2 -2
- package/bin/chunk-rvspnthy.js +1 -0
- package/bin/{chunk-g0jy85re.js → chunk-s0hgykza.js} +2 -2
- package/bin/chunk-sjjndwt4.js +2 -0
- package/bin/chunk-t3tp9trj.js +2 -0
- package/bin/{chunk-hbrndqpj.js → chunk-t9t9evan.js} +2 -2
- package/bin/{chunk-s0k2r6ym.js → chunk-tpp9qf5m.js} +2 -2
- package/bin/chunk-tvg9gvqs.js +1 -0
- package/bin/{chunk-43mhpb0k.js → chunk-tzt4c1dm.js} +2 -2
- package/bin/{chunk-52qe6z8w.js → chunk-v8w2nxew.js} +1 -1
- package/bin/{chunk-5yxngq5n.js → chunk-v98e3gex.js} +1 -1
- package/bin/{chunk-4sdrjye2.js → chunk-vxpnp4xg.js} +2 -2
- package/bin/chunk-x3ynjbt5.js +307 -0
- package/bin/{chunk-jkapr5we.js → chunk-x6532q76.js} +1 -1
- package/bin/chunk-xp4dcyk3.js +1 -0
- package/bin/chunk-y8aehqr8.js +2 -0
- package/bin/{chunk-6j6dejtd.js → chunk-ytzk81tr.js} +1 -1
- package/bin/chunk-yvxt48r4.js +1 -0
- package/bin/{chunk-jf5ytqxd.js → chunk-zg60j9x2.js} +1 -1
- package/bin/{chunk-zj1rz1s9.js → chunk-zjj9qj6y.js} +2 -2
- package/bin/{chunk-weean2ja.js → chunk-zqg4f56h.js} +1 -1
- package/bin/chunk-zwgf211t.js +2 -0
- package/bin/shumai-app.html +1 -1
- package/bin/shumai-app.js +500 -364
- 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/bin/chunk-1fqpgz02.js +0 -2
- package/bin/chunk-21hvrvzj.js +0 -2
- package/bin/chunk-23mj9p82.js +0 -1
- package/bin/chunk-24mag65w.js +0 -1
- package/bin/chunk-29203j0e.js +0 -7
- package/bin/chunk-2jv9re91.js +0 -2
- package/bin/chunk-2rmceamt.js +0 -1
- package/bin/chunk-6kv3jyfc.js +0 -2
- package/bin/chunk-95qc4bkh.js +0 -2
- package/bin/chunk-9nd5m7hy.js +0 -1
- package/bin/chunk-ampyjbj4.js +0 -1
- package/bin/chunk-bkcf4hw5.js +0 -1
- package/bin/chunk-cbjfw47x.js +0 -62
- package/bin/chunk-h2tztyxs.js +0 -1
- package/bin/chunk-htrzgs2a.css +0 -1
- package/bin/chunk-jqyprvqd.js +0 -1
- package/bin/chunk-jyeyp8p3.js +0 -1
- package/bin/chunk-kwr4m6vh.js +0 -1
- package/bin/chunk-n62kyrh1.js +0 -1
- package/bin/chunk-ntxwp6aa.js +0 -3
- package/bin/chunk-qxwfhv63.js +0 -2
- package/bin/chunk-v0cdg3n6.js +0 -307
- package/bin/chunk-x217skr3.js +0 -2
- package/bin/chunk-y6aa5ee0.js +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shumai-one/shumai",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.7",
|
|
4
4
|
"description": "A fullstack AI-powered media workspace and workflow engine",
|
|
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-darwin-arm64": "0.3.
|
|
31
|
-
"@shumai-one/shumai-darwin-x64": "0.3.
|
|
32
|
-
"@shumai-one/shumai-linux-arm64": "0.3.
|
|
33
|
-
"@shumai-one/shumai-linux-x64": "0.3.
|
|
34
|
-
"@shumai-one/shumai-win32-arm64": "0.3.
|
|
35
|
-
"@shumai-one/shumai-win32-x64": "0.3.
|
|
30
|
+
"@shumai-one/shumai-darwin-arm64": "0.3.7",
|
|
31
|
+
"@shumai-one/shumai-darwin-x64": "0.3.7",
|
|
32
|
+
"@shumai-one/shumai-linux-arm64": "0.3.7",
|
|
33
|
+
"@shumai-one/shumai-linux-x64": "0.3.7",
|
|
34
|
+
"@shumai-one/shumai-win32-arm64": "0.3.7",
|
|
35
|
+
"@shumai-one/shumai-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")
|
package/bin/chunk-1fqpgz02.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{e as RA}from"./chunk-y6aa5ee0.js";import{f as yA,g as DA}from"./chunk-8na8a41a.js";import{l as xA}from"./chunk-v0cdg3n6.js";import{o as wA}from"./chunk-29203j0e.js";import{J as NA,w as OA}from"./chunk-6kv3jyfc.js";import{V as MA}from"./chunk-s0k2r6ym.js";import{Ea as qA,Ha as kA,Ja as i,ra as y,ua as QA,va as UA}from"./chunk-fw5k0xrc.js";import{tf as WA,uf as l}from"./chunk-fnkrzqrn.js";import{vf as EA}from"./chunk-6vn44e4d.js";import{dg as LA}from"./chunk-t58kqafx.js";import{xg as zA}from"./chunk-8mzg29m4.js";import{Ag as J1,Bg as c,Cg as B,Dg as U,Eg as VA,Gj as TA,Hg as o,Jg as $A,Kg as r,Pg as HA,eh as H,yj as KA}from"./chunk-cbjfw47x.js";import{Kk as G1}from"./chunk-gd1x3rgn.js";var X=G1(J1(),1);function BA(Y,J,q,Z,E,K){let h=Y.type==="folder",T=J.type==="folder";if(h!==T)return null;let L=T?Z:E,k=L.findIndex(($)=>$.id===q),O=L.findIndex(($)=>$.id===J.id);if(k===-1||O===-1)return null;let C=Math.min(k,O),F=Math.max(k,O),M=L.slice(C,F+1),_=new Set(K);return M.forEach(($)=>{if($.id)_.add($.id)}),_}function X1({teamId:Y,projectId:J,projectName:q,assetId:Z,rootFolderId:E,collection:K,onUpdateCollection:h}){let T=HA(),L=VA(),{canEdit:k}=zA(J),{setFields:O}=OA(),C=H.api.files[":fileId"].metadata.$patch,{mutate:F}=$A({mutationFn:async(A)=>{if(!(await C(A)).ok)throw Error("Failed to patch metadata");return null}}),{data:M}=o({queryKey:["fields",J],queryFn:async()=>{let A=await H.api.projects[":projectId"].fields.$get({param:{projectId:J}});if(!A.ok)throw Error("Failed to fetch fields");return await A.json()},enabled:!!J});X.useEffect(()=>{if(M)O(M,J)},[M,J,O]);let _=Z==="recently-deleted",[$,g]=X.useState(null),[W,D]=X.useState(new Set),[u,a]=X.useState(null),[PA,vA]=X.useState(240),[bA,hA]=X.useState(360),{isChatbotOpen:f}=l(),{members:CA,fetchMembers:d}=NA(),{metadata:FA,fetchMetadata:s,setMetadata:gA}=LA();X.useEffect(()=>{if(Y)d(Y),s(Y)},[Y,d,s]);let S=X.useMemo(()=>{return K?.filter?.searchFilter?.conditions||[]},[K]),[N,j]=X.useState(S);X.useEffect(()=>{j(S)},[S]);let t=`project:${J}:sort`,w=FA[t]||{field:"custom",order:"asc"},uA=(A)=>{if(A)gA(Y,t,A)},z=!!K,p=N.length>0||z,{fileListLeftSidebarCollapsed:e,setFileListLeftSidebarCollapsed:fA,fileListRightSidebarCollapsed:AA,setFileListRightSidebarCollapsed:SA,viewModes:jA}=EA(),GA=jA[J]??"card",pA=X.useRef(null),{data:P}=_?{data:void 0}:o({queryKey:["folders",Z],queryFn:async()=>{let A=await H.api.folders[":folderId"].$get({param:{folderId:Z}});if(!A.ok)throw Error("failed to fetch folder");return await A.json()}}),{setProjectState:JA,clearProjectState:XA}=WA();X.useEffect(()=>{return JA({teamId:Y,projectId:J,projectName:q,ancestorFolders:P?.ancestorFolders??[],currentAsset:_?{name:"Recently Deleted",type:"folder"}:z?{name:K.name,type:"folder"}:{name:P?.name,type:"folder"},isRootFolder:!_&&!z&&Z===E,onFolderClick:(A)=>{T({to:"/projects/$projectId/folders/$folderId",params:{projectId:J,folderId:A}})}}),()=>XA()},[Y,J,q,P,_,Z,E,JA,XA,T]);let{data:m,fetchNextPage:mA,hasNextPage:nA,isFetchingNextPage:IA}=r({queryKey:_?["projects",J,"recently-deleted","folder"]:["search",Y,Z,"folder",N,w,z],queryFn:async({pageParam:A})=>{if(_||z){if(_){let V=await H.api.projects[":projectId"]["recently-deleted"].$get({param:{projectId:J},query:{assetType:"folder",after:A}});if(!V.ok)throw Error("failed to fetch recently deleted folders");return await V.json()}return{data:[],pageInfo:{total:0}}}if(p)return{data:[],pageInfo:{total:0}};let G=await H.api.folders[":folderId"].search.$post({param:{folderId:Z},json:{assetType:"folder",after:A,recursively:!1,sort:w,conditions:[]}});if(!G.ok)throw Error("failed to search folders");return await G.json()},enabled:!p,initialPageParam:"",getNextPageParam:(A)=>{return A.pageInfo?.cursor||void 0}}),{data:n,fetchNextPage:cA,hasNextPage:oA,isFetchingNextPage:rA}=r({queryKey:_?["projects",J,"recently-deleted","file"]:["search",Y,Z,"file",N,w,z],queryFn:async({pageParam:A})=>{if(_){let V=await H.api.projects[":projectId"]["recently-deleted"].$get({param:{projectId:J},query:{assetType:"file",after:A}});if(!V.ok)throw Error("failed to fetch recently deleted files");return await V.json()}let G=await H.api.folders[":folderId"].search.$post({param:{folderId:Z},json:{assetType:"file",after:A,recursively:p||z,conditions:N,sort:w}});if(!G.ok)throw Error("failed to search files");return await G.json()},initialPageParam:"",getNextPageParam:(A)=>{return A.pageInfo?.cursor||void 0}}),v=m?.pages.flatMap((A)=>A.data??[])??[],Q=n?.pages.flatMap((A)=>A.data??[])??[],lA=m?.pages[0]?.pageInfo?.total,iA=n?.pages[0]?.pageInfo?.total,aA=m?.pages[0]?.pageInfo?.totalSize,dA=n?.pages[0]?.pageInfo?.totalSize,YA=()=>{D(new Set),g(null),a(null)},{dragState:x,handleDragStart:sA,handleDragEnd:tA}=DA({teamId:Y,projectId:J,assetId:Z,folders:v,files:Q,selectedIds:W,onClearSelection:YA}),I=X.useMemo(()=>{if(W.size!==1)return null;let A=Array.from(W)[0];return Q.find((V)=>V.id===A)||null},[W,Q]),eA=(A)=>{if(_)return;if(A.type==="folder")j([]),T({to:"/projects/$projectId/folders/$folderId",params:{projectId:J,folderId:A.id}});else T({to:"/projects/$projectId/files/$fileId",params:{projectId:J,fileId:A.versionStack?A.versionStack.id:A.id},search:{version:void 0}})},A1=(A,G)=>{let V=G.metaKey||G.ctrlKey;if(G.shiftKey&&u){let _A=[...v,...Q].find((b)=>b.id===u);if(_A){let b=BA(_A,A,u,v,Q,W);if(b){D(b),g(A);return}}}if(V){let R=new Set(W);if(R.has(A.id))R.delete(A.id);else R.add(A.id);D(R)}else D(new Set([A.id]));a(A.id),g(A)},ZA=(A,G,V)=>{F({param:{fileId:A},json:[{key:G,value:V}]},{onSuccess:()=>{L.invalidateQueries({queryKey:["folders",Z,"children",{assetType:"file"}]}),L.invalidateQueries({queryKey:["search",Y,Z]})}})};return U(qA,{modifiers:[yA.configure({anchor:{x:0,y:0}})],plugins:(A)=>A.map((G)=>{if(G===y)return y.configure({dropAnimation:null});if(typeof G==="object"&&G!==null&&"plugin"in G&&G.plugin===y)return y.configure({dropAnimation:null});return G}),sensors:_||!k?[]:[UA.configure({activationConstraints:[new QA.Distance({value:10})]})],onDragStart:sA,onDragEnd:tA,children:[B("div",{className:"flex flex-1 flex-col bg-background min-h-0",children:U("div",{ref:pA,className:"flex flex-1 overflow-hidden relative",children:[!e&&B("div",{className:"md:hidden fixed inset-0 bg-black/50 z-40",onClick:()=>fA(!0)}),(!AA||f)&&B("div",{className:"md:hidden fixed inset-0 bg-black/50 z-40",onClick:()=>{SA(!0),l.getState().setIsChatbotOpen(!1)}}),!e&&U(c,{children:[B("div",{className:"bg-background",style:{width:PA},children:B(MA,{teamId:Y,projectId:J,projectName:q,rootFolderId:E,dragState:x,ancestorFolders:P?.ancestorFolders??[]})}),B(i,{onResize:(A)=>{vA((G)=>Math.max(180,Math.min(400,G+A)))},className:"hidden md:block"})]}),B(wA,{teamId:Y,projectId:J,assetId:Z,folders:v,files:Q,totalFolders:lA,totalFiles:iA,totalFoldersSize:aA,totalFilesSize:dA,selectedItem:$,selectedIds:W,onItemSelect:A1,onItemDoubleClick:eA,onSaveField:ZA,displayStyle:GA,onClearSelection:YA,fetchNextFoldersPage:mA,hasNextFoldersPage:nA||!1,isFetchingNextFoldersPage:IA,fetchNextFilesPage:cA,hasNextFilesPage:oA||!1,isFetchingNextFilesPage:rA,isRecentlyDeleted:_,filterConditions:N,onFilterChange:j,sort:w,onSortChange:uA,dragState:x,collection:K,onUpdateCollection:h,rootFolderId:E}),(!AA||f)&&U(c,{children:[B(i,{onResize:(A)=>{hA((G)=>Math.max(240,Math.min(600,G-A)))},className:"hidden md:block"}),B("div",{style:{width:bA},className:"bg-background flex flex-col flex-shrink-0",children:f?B(RA,{projectId:J,contextAssetId:Z}):I?B(xA,{teamId:Y,projectId:J,file:I,onSaveField:(A,G)=>ZA(I.id,A,G),members:CA,hideAnnotationControl:!0}):B("div",{className:"flex h-full items-center justify-center p-4 text-center text-sm text-muted-foreground",children:TA.select_asset_to_view_details()})})]})]})}),B(kA,{children:x?.isActive?B("div",{className:KA("flex items-center gap-2 rounded-md bg-popover px-3 py-2 text-sm font-medium text-popover-foreground shadow-md ring-1 ring-border cursor-grabbing",GA==="list"&&"w-30 h-[40px] px-0 flex-none overflow-hidden justify-center"),style:{transform:"translate(0px, 0px)"},children:U("span",{children:["Moving ",x.itemCount," item",x.itemCount!==1?"s":""]})}):null})]})}
|
|
2
|
-
export{X1 as d};
|
package/bin/chunk-21hvrvzj.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{ig as e}from"./chunk-r9s1zs4g.js";import{Cg as v,sj as U,yj as P}from"./chunk-cbjfw47x.js";var x={human:"human",agent:"agent"};var l={editor:"editor",reviewer:"reviewer"};var S={team:"team",project:"project"};var h={chat:"chat",autofill:"autofill",embedding:"embedding"};var n=e.object({cursor:e.string().optional(),total:e.number().optional(),totalSize:e.number().optional()}),a=e.object({first:e.coerce.number().optional(),after:e.string().optional()});var ge=e.object({name:e.string()}),w=e.object({id:e.string(),name:e.string(),rootFolder:e.string().optional(),updatedAt:e.union([e.string(),e.date()])});var ye=e.object({data:e.array(w),pageInfo:n}),ue=e.object({teamId:e.string(),userId:e.string()}),xe=e.object({id:e.string(),name:e.string(),email:e.string().optional(),role:e.enum(["owner","editor","reviewer","bot","unknown"]),image:e.string().optional(),unreadNotificationCount:e.number().optional()}),Se=e.object({name:e.string().optional(),imageKey:e.string().nullable().optional()}),he=e.object({id:e.string(),name:e.string(),role:e.enum(["owner","editor","reviewer","bot","unknown"]),email:e.string().optional(),type:e.nativeEnum(x).optional(),image:e.string().optional(),scope:e.nativeEnum(S).optional()}),be=e.object({includeAgents:e.string().optional().transform((o)=>o==="true")}),C={best_match:"best_match",all:"all"},_e=e.union([e.object({key:e.literal("transcode.videoStrategy"),value:e.nativeEnum(C)})]),Re=e.object({allowedDomains:e.array(e.string()),pendingDomains:e.array(e.string()).default([])});var je=e.object({role:e.enum(["editor","reviewer"])});var b=e.nativeEnum(h),_=e.enum(["off","minimal","low","medium","high","xhigh"]),F=e.object({id:e.string().optional(),skillId:e.string(),skill:e.object({id:e.string(),name:e.string()}).optional()}),Te=e.object({id:e.string(),name:e.string(),type:b,enabled:e.boolean(),avatar:e.string().optional(),providerId:e.string().optional(),modelId:e.string().optional(),thinkingLevel:_.optional().default("off"),systemPrompt:e.string().optional(),soul:e.string().optional(),skills:e.array(F).optional(),deniedTools:e.array(e.string()).optional()}),R=e.object({name:e.string().min(1),type:b,enabled:e.boolean().optional().default(!0),avatar:e.string().optional(),providerId:e.string().optional(),modelId:e.string().optional(),thinkingLevel:_.optional().default("off"),systemPrompt:e.string().optional(),soul:e.string().optional(),skills:e.array(e.string()).optional(),deniedTools:e.array(e.string()).optional()}),ve=R.superRefine((o,r)=>{if(o.type==="chat"||o.type==="autofill"){if(!o.providerId)r.addIssue({code:e.ZodIssueCode.custom,message:"providerId is required for chat/autofill agents",path:["providerId"]});if(!o.modelId)r.addIssue({code:e.ZodIssueCode.custom,message:"modelId is required for chat/autofill agents",path:["modelId"]})}}),Ue=R.superRefine((o,r)=>{if(o.type==="chat"||o.type==="autofill"){if(!o.providerId)r.addIssue({code:e.ZodIssueCode.custom,message:"providerId is required for chat/autofill agents",path:["providerId"]});if(!o.modelId)r.addIssue({code:e.ZodIssueCode.custom,message:"modelId is required for chat/autofill agents",path:["modelId"]})}}),Pe=e.object({id:e.string(),sessionId:e.string(),entry:e.unknown()}),Me=e.object({id:e.string(),name:e.string().nullable().optional(),type:e.string(),createdAt:e.string(),creator:e.object({id:e.string(),name:e.string().nullable().optional(),email:e.string().nullable().optional(),image:e.string().nullable().optional()}).nullable().optional(),agentId:e.string().optional()});var Fe=e.object({apiKey:e.string().optional(),baseUrl:e.string().optional(),chatModels:e.array(e.string()).optional()}),N=e.enum(["1h","24h","7d","30d"]),Ne=e.object({timeframe:N.default("30d"),userId:e.string().optional()});var Oe=e.object({data:e.array(e.lazy(()=>V)),pageInfo:n}),j=e.object({proxyType:e.enum(["image","video","audio","pdf"]).nullable().optional(),thumbnailUrl:e.string().optional(),originalHeight:e.number().optional(),originalWidth:e.number().optional(),spriteUrl:e.string().optional(),duration:e.number().optional(),pageCount:e.number().optional()}),L=e.object({type:e.string().nullable(),preview:j.nullable()}),s=e.object({id:e.string(),name:e.string(),image:e.string().optional()}),E=e.object({fieldId:e.string(),value:e.any()}),W=e.object({id:e.string(),name:e.string()}),O=e.object({duration:e.number().optional(),originalWidth:e.number().optional(),originalHeight:e.number().optional(),frameRate:e.number().optional(),totalFrames:e.number().optional(),startTimecode:e.string().optional()}),V=e.object({id:e.string(),name:e.string(),sizeByte:e.number(),fileCount:e.number(),type:e.string(),targetType:e.string().optional().nullable(),status:e.string(),proxyType:e.enum(["image","video","audio","pdf"]).nullable().optional(),latestChildren:e.array(L).optional(),preview:j.nullable().optional(),createdAt:e.string(),updatedAt:e.string(),deletedAt:e.string().nullable().optional(),projectId:e.string().optional().nullable(),creator:s.nullable().optional(),fieldValues:e.array(E).optional(),sortIndex:e.string().optional().nullable(),startTime:e.number().optional().nullable(),endTime:e.number().optional().nullable(),media:e.object({original:e.object({key:e.string().optional()}).optional(),videoTranscodes:e.array(e.object({id:e.string(),url:e.string(),key:e.string(),width:e.number(),height:e.number(),size:e.number()})).optional(),imageTranscodes:e.array(e.object({id:e.string(),url:e.string(),key:e.string(),width:e.number(),height:e.number(),size:e.number()})).optional(),videoPreview:e.object({url:e.string(),key:e.string().optional()}).optional(),pdfTranscode:e.object({url:e.string(),key:e.string().optional()}).optional(),proxyType:e.enum(["image","video","audio","pdf"]).nullable().optional(),metadata:O.optional()}).optional(),ancestorFolders:e.array(W).optional(),versionStack:e.object({id:e.string(),versions:e.array(e.object({version:e.number(),current:e.boolean(),id:e.string(),name:e.string().optional().nullable(),previewUrl:e.string().optional().nullable(),creator:e.object({id:e.string(),name:e.string().nullable()}).nullable().optional()}))}).optional().nullable()}),Ve=e.object({name:e.string(),type:e.string(),projectId:e.string().optional(),parentId:e.string().optional(),key:e.string().optional(),sizeByte:e.number().optional(),contentType:e.string().optional(),creatorId:e.string().optional()}),Qe=e.object({assetId:e.string()}),Ke=e.object({id:e.string(),name:e.string()}),De=e.object({assetId:e.string().optional(),assetType:e.string(),projectId:e.string().optional(),showDeleted:e.boolean().optional(),prefix:e.string().optional(),sort:e.string().optional(),order:e.string().optional(),...a.shape}),Ze=e.object({assetId:e.string(),userId:e.string(),replyToId:e.string().optional(),message:e.string(),annotations:e.any().optional(),second:e.number().optional(),attachmentIds:e.array(e.string())}),Q=e.object({id:e.string(),assetId:e.string(),url:e.string(),proxyType:e.enum(["image","video","audio","pdf"]).nullable().optional()}),K=e.object({id:e.string(),assetId:e.string(),message:e.string().nullable(),annotations:e.any(),second:e.number().nullable(),creator:s,replies:e.array(e.lazy(()=>K)),attachments:e.array(Q),mentions:e.array(s),createdAt:e.string(),updatedAt:e.string(),sessionId:e.string().nullable(),isCompleted:e.boolean(),completionLastChangedBy:s.nullable()}),Be=e.object({isCompleted:e.boolean()}),Ge=e.object({newParentId:e.string(),assetIds:e.array(e.string()),creatorId:e.string().optional()}),Je=e.object({newParentId:e.string(),assetIds:e.array(e.string()),withComments:e.boolean().default(!1),creatorId:e.string().optional()}),Ye=e.object({name:e.string()}),He=e.object({beforeIndex:e.string().optional(),afterIndex:e.string().optional()}),Xe=e.object({ids:e.array(e.string())}),$e=e.object({ids:e.array(e.string())}),Ae=e.object({file:e.instanceof(File)}),ze=e.object({key:e.string()}),et=e.object({fileName:e.string(),contentType:e.string(),size:e.number()}),tt=e.object({id:e.string(),uploadUrl:e.string()}),ot=e.object({ids:e.array(e.string())}),D=e.object({id:e.string(),name:e.string(),url:e.string()}),rt=e.object({files:e.array(D)});var st=e.object({userCount:e.number()}),it=e.object({name:e.string().min(1,"Name is required").max(100,"Name is too long")}),pt=e.object({id:e.string(),token:e.string(),name:e.string(),createdAt:e.string()});var Z=e.enum(["is","eq","neq","gt","gte","lt","lte","contains","notContains","isEmpty","isNotEmpty","in","notIn","hasAny","hasAll","hasNone","isWithin"]),B=e.object({field:e.string(),operator:Z,value:e.any()}),G=e.enum(["asc","desc"]),J=e.object({field:e.string(),order:G}),Y=e.enum(["AND","OR"]),H=e.enum(["file","folder"]),m=e.object({operator:Y.optional().default("AND"),conditions:e.array(B).optional().default([]),sort:J.optional(),assetType:H.optional(),showSymlink:e.boolean().optional(),recursively:e.boolean().optional().default(!0),query:e.string().optional(),isSemantic:e.boolean().optional().default(!1)}),ft=m.extend(a.shape);var f=e.object({sourceFolderId:e.string(),searchFilter:m}),X=e.object({id:e.string(),name:e.string(),filter:f,projectId:e.string(),createdAt:e.string(),updatedAt:e.string(),creator:e.object({id:e.string(),name:e.string(),image:e.string().optional().nullable()}).optional().nullable()}),xt=e.object({name:e.string(),filter:f}),St=e.object({name:e.string().optional(),filter:f.optional()});var ht=e.object({data:e.array(X),pageInfo:e.object({cursor:e.string().optional(),total:e.number().optional()})});var Rt=e.object({name:e.string(),parentId:e.string()}),jt=e.object({name:e.string()}),kt=e.object({ids:e.array(e.string())}),It=e.object({ids:e.array(e.string())});var Ut=e.object({code:e.string(),role:e.string(),teamId:e.string(),teamName:e.string(),projectId:e.string().optional(),projectName:e.string().optional(),inviterName:e.string(),isUsed:e.boolean()}),Pt=e.object({role:e.nativeEnum(l)}),Mt=e.object({role:e.nativeEnum(l)}),wt=e.object({code:e.string()});var Et={text:"text",longText:"longText",select:"select",selectMulti:"selectMulti",rating:"rating",number:"number",toggle:"toggle",date:"date",user:"user",userMulti:"userMulti"},Wt=e.object({id:e.string(),displayName:e.string(),color:e.string().optional()}),d=e.object({name:e.string(),type:e.enum(["text","longText","select","selectMulti","rating","number","toggle","date","user","userMulti"]),text:e.any().optional(),longText:e.any().optional(),select:e.any().optional(),selectMulti:e.any().optional(),rating:e.any().optional(),number:e.any().optional(),toggle:e.any().optional(),date:e.any().optional(),user:e.any().optional(),userMulti:e.any().optional()}),Ot=e.object({key:e.string().optional(),label:e.string().optional(),scope:e.string().optional(),config:d,aiAutofill:e.boolean().default(!1),description:e.string().default("")}),Vt=e.object({label:e.string().optional(),config:d,aiAutofill:e.boolean().optional(),description:e.string().optional()}),$=e.object({fieldId:e.string(),visible:e.boolean()}),Qt=e.array($),A=e.object({key:e.string(),value:e.any()}),Kt=e.array(A),Dt=e.object({id:e.string(),config:d,scope:e.string(),readOnly:e.boolean(),visible:e.boolean(),description:e.string(),aiAutofill:e.boolean()});var k=e.object({id:e.string().optional(),name:e.string().optional(),role:e.string().optional()}),I=e.object({id:e.string().optional(),name:e.string().optional()}),z=e.object({id:e.string().optional(),proxyType:e.enum(["image","video","audio","pdf"]).nullable().optional(),name:e.string().optional(),preview:e.string().optional(),thumbnailUrl:e.string().optional(),originalWidth:e.number().optional(),originalHeight:e.number().optional()}),Gt=e.object({id:e.string().optional(),creator:k.optional(),type:e.string().optional(),team:I.optional(),project:I.optional(),asset:z.optional(),user:k.optional(),createdAt:e.string().optional(),isRead:e.boolean().optional()}),Jt=e.object({unreadOnly:e.union([e.boolean(),e.string()]).transform((o)=>o===!0||o==="true").optional(),after:e.string().optional(),pageSize:e.coerce.number().optional()}),Yt=e.object({notificationId:e.string().min(1)}),Ht=e.object({comments:e.boolean().default(!0),replies:e.boolean().default(!0),mentions:e.boolean().default(!0),yourUploads:e.boolean().default(!1),otherUploads:e.boolean().default(!0),statusUpdates:e.boolean().default(!0)});var zt=e.object({name:e.string(),coverImageKey:e.string().optional(),enableNotification:e.boolean().default(!0)}),eo=e.object({name:e.string().optional(),coverImageKey:e.string().optional(),enableNotification:e.boolean().optional()}),ee=e.object({id:e.string(),name:e.string(),teamId:e.string(),rootFolder:e.string().optional(),coverImage:e.string().optional(),coverImageKey:e.string().optional(),enableNotification:e.boolean(),updatedAt:e.union([e.string(),e.date()])}),to=e.object({sortBy:e.string().optional(),sortDirection:e.enum(["asc","desc"]).optional()}).merge(a),oo=e.object({data:e.array(ee),pageInfo:n}),ro=e.object({teamId:e.string()}),ao=e.object({id:e.string(),name:e.string(),role:e.enum(["owner","editor","reviewer","bot","unknown"]),image:e.string().optional(),scope:e.enum(["team","project"]).optional(),hasCustomRole:e.boolean().optional()}),no=e.object({id:e.string(),name:e.string()}),so=e.object({assetType:e.string(),sort:e.enum(["createdAt","name","size"]).optional(),order:e.enum(["asc","desc"]).optional()}).merge(a),io=e.object({role:e.enum(["editor","reviewer"])}),po=e.object({userId:e.string(),role:e.enum(["owner","editor","reviewer"])}),co=e.object({id:e.string(),name:e.string(),role:e.enum(["owner","editor","reviewer","bot","unknown"]),image:e.string().optional()});var q=["openai-completions","mistral-conversations","openai-responses","azure-openai-responses","openai-codex-responses","anthropic-messages","bedrock-converse-stream","google-generative-ai","google-vertex"],te=e.object({api:e.enum(q).optional(),reasoning:e.boolean().default(!1),input:e.array(e.enum(["text","image"])).default(["text"]),contextWindow:e.number().int().positive().default(128000),maxTokens:e.number().int().positive().default(4096),cost:e.object({input:e.number().nonnegative().default(0),output:e.number().nonnegative().default(0),cacheRead:e.number().nonnegative().default(0),cacheWrite:e.number().nonnegative().default(0)})}),g=e.object({id:e.string().optional(),modelId:e.string().min(1,"Model ID is required"),name:e.string().min(0).default(""),config:te}),y=e.object({baseUrl:e.string().url("Must be a valid URL").optional().or(e.literal("")),apiKey:e.string().optional().or(e.literal("")),api:e.enum(q),headers:e.record(e.string(),e.string()).optional(),authHeader:e.boolean().optional()}),fo=e.object({name:e.string().min(1,"Provider name is required"),config:y,models:e.array(g).min(1,"At least one model is required")}),go=e.object({config:y,models:e.array(g).min(1,"At least one model is required")}),yo=e.object({id:e.string(),name:e.string(),isBuiltin:e.boolean(),config:y,models:e.array(g).optional(),modelsCount:e.number().optional(),createdAt:e.date(),updatedAt:e.date()});var ho=e.object({name:e.string().min(1),expireAt:e.string().datetime().optional(),password:e.string().optional(),isDisabled:e.boolean().optional(),allowDownload:e.boolean().optional(),defaultSortOrder:e.string().optional(),viewMode:e.string().optional()}),bo=e.object({name:e.string().min(1).optional(),expireAt:e.string().datetime().optional().nullable(),password:e.string().optional().nullable(),isDisabled:e.boolean().optional(),allowDownload:e.boolean().optional(),defaultSortOrder:e.string().optional().nullable(),viewMode:e.string().optional().nullable(),fieldVisibility:e.record(e.string(),e.boolean()).optional().nullable()}),_o=a.extend({projectId:e.string().optional()}),Ro=e.object({assetIds:e.array(e.string().min(1)).min(1)});var Io=e.object({assetId:e.string().optional(),githubUrl:e.string().optional(),override:e.boolean().optional()}),qo=e.object({config:e.object({environmentVariables:e.array(e.object({name:e.string(),default:e.string().optional()}))})}),To=e.object({permission:e.enum(["owner","editor","reviewer"])});var T=e.lazy(()=>e.object({name:e.string(),id:e.string(),size:e.number(),children:e.array(T),type:e.string(),mediaType:e.string().optional()})),Po=e.object({parentId:e.string(),files:e.array(T)}),oe=e.object({id:e.string(),fileId:e.string(),url:e.string()}),Mo=e.object({taskId:e.string(),presignedUrls:e.array(oe),createdAssets:e.array(e.object({tempId:e.string(),assetId:e.string()})).optional()}),wo=e.object({fileId:e.string(),errorMessage:e.string().optional()}),Co=e.object({id:e.string(),name:e.string(),total:e.number(),uploaded:e.number(),createdAt:e.string()}),Fo=e.object({bucket:e.string(),key:e.string(),Signature:e.string()}),No=e.object({file:e.instanceof(File)});var re=e.object({key:e.string(),value:e.unknown()}),Wo=e.object({value:e.unknown()}),Oo=e.array(re);var Ko=e.object({fileIds:e.array(e.string())}),Do=e.object({fileId:e.string(),beforeId:e.string()});var Go=e.object({agentId:e.string(),textPrompt:e.string().optional(),attachedFiles:e.array(e.string()).optional(),assetIds:e.array(e.string()).optional(),sessionId:e.string().optional(),contextAssetId:e.string().optional(),projectId:e.string().optional()}).superRefine((o,r)=>{let p=o.textPrompt&&o.textPrompt.trim().length>0,c=o.attachedFiles&&o.attachedFiles.length>0,M=o.assetIds&&o.assetIds.length>0;if(!p&&!c&&!M)r.addIssue({code:e.ZodIssueCode.custom,message:"At least one of textPrompt, attachedFiles, or assetIds must be provided.",path:["textPrompt"]})}),Jo=e.object({id:e.string(),agentId:e.string(),userId:e.string().nullable(),assetId:e.string().nullable(),userCommentId:e.string().nullable(),name:e.string().nullable().optional(),createdAt:e.string(),updatedAt:e.string()}),Yo=e.intersection(e.object({id:e.string()}),e.unknown());var i;((t)=>{t.team_create="team_create";t.team_update="team_update";t.team_delete="team_delete";t.team_member_add="team_member_add";t.team_member_update="team_member_update";t.team_member_remove="team_member_remove";t.project_create="project_create";t.project_update="project_update";t.project_delete="project_delete";t.project_empty_trash="project_empty_trash";t.project_member_add="project_member_add";t.project_member_update="project_member_update";t.project_member_remove="project_member_remove";t.file_create="file_create";t.file_update="file_update";t.file_delete="file_delete";t.folder_create="folder_create";t.folder_update="folder_update";t.folder_delete="folder_delete";t.asset_reparent="asset_reparent";t.asset_copy="asset_copy";t.share_create="share_create";t.share_update="share_update";t.share_delete="share_delete";t.agent_create="agent_create";t.agent_update="agent_update";t.agent_delete="agent_delete";t.skill_create="skill_create";t.skill_update="skill_update";t.skill_delete="skill_delete";t.provider_create="provider_create";t.provider_update="provider_update";t.provider_delete="provider_delete";t.invite_create="invite_create";t.invite_revoke="invite_revoke";t.metadata_field_create="metadata_field_create";t.metadata_field_update="metadata_field_update";t.metadata_field_delete="metadata_field_delete";t.comment_create="comment_create";t.comment_update="comment_update";t.comment_delete="comment_delete";t.comment_complete="comment_complete"})(i||={});var ae=e.object({id:e.string(),action:e.nativeEnum(i),teamId:e.string(),userId:e.string().nullable().optional(),projectId:e.string().nullable().optional(),itemId:e.string().nullable().optional(),createdAt:e.string()}),$o=e.object({first:e.coerce.number().optional(),after:e.string().optional(),actions:e.union([e.nativeEnum(i),e.array(e.nativeEnum(i))]).transform((o)=>Array.isArray(o)?o:[o]).optional(),userIds:e.union([e.string(),e.array(e.string())]).transform((o)=>Array.isArray(o)?o:[o]).optional(),itemId:e.string().optional()}),Ao=e.object({nodes:e.array(ae),pageInfo:e.object({hasNextPage:e.boolean(),endCursor:e.string().nullable()}),total:e.number()});var ne=e.object({id:e.string(),type:e.literal("text"),x:e.number().min(0).max(1),y:e.number().min(0).max(1),opacity:e.number().min(0).max(1),rotation:e.number().min(-180).max(180),text:e.string(),size:e.number().positive().max(1),color:e.string()}),se=e.object({id:e.string(),type:e.literal("image"),x:e.number().min(0).max(1),y:e.number().min(0).max(1),opacity:e.number().min(0).max(1),rotation:e.number().min(-180).max(180),imageAssetKey:e.string().min(1),imageAssetUrl:e.string().optional(),size:e.number().positive().max(1)}),ie=e.discriminatedUnion("type",[ne,se]),u=e.object({blocks:e.array(ie)}),tr=e.object({name:e.string().min(1),teamId:e.string().optional(),config:u}),or=e.object({name:e.string().min(1).optional(),config:u.optional()}),rr=e.object({enabled:e.boolean(),config:u.optional()}).superRefine((o,r)=>{if(o.enabled&&(!o.config||o.config.blocks.length===0))r.addIssue({code:"custom",path:["config"],message:"Watermark configuration is required when enabling watermark"})});function Mr({className:o,orientation:r="horizontal",decorative:p=!0,...c}){return v(U.Root,{"data-slot":"separator",decorative:p,orientation:r,className:P("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",o),...c})}
|
|
2
|
-
export{_ as Wa,Et as Xa,q as Ya,g as Za,y as _a,C as $a,i as ab,Mr as bb};
|
package/bin/chunk-23mj9p82.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as _}from"./chunk-1fqpgz02.js";import"./chunk-y6aa5ee0.js";import"./chunk-8na8a41a.js";import"./chunk-v0cdg3n6.js";import"./chunk-sx1neqgr.js";import"./chunk-29203j0e.js";import"./chunk-6kv3jyfc.js";import"./chunk-d1zpcags.js";import"./chunk-s0g0bc6t.js";import"./chunk-s0k2r6ym.js";import"./chunk-fw5k0xrc.js";import"./chunk-8vc1m0kw.js";import"./chunk-nh4tzzn8.js";import"./chunk-21hvrvzj.js";import"./chunk-avvzqqk2.js";import"./chunk-4rz2105a.js";import"./chunk-f7fevgv2.js";import"./chunk-rek85wwv.js";import{Ae as Z,ze as Y}from"./chunk-c5esphve.js";import"./chunk-8hq6sn31.js";import"./chunk-zj1rz1s9.js";import"./chunk-fnkrzqrn.js";import"./chunk-6vn44e4d.js";import"./chunk-f70xdh07.js";import"./chunk-qm9w9fcv.js";import"./chunk-n67rfv86.js";import"./chunk-t58kqafx.js";import"./chunk-7jkvjm4x.js";import"./chunk-r9s1zs4g.js";import"./chunk-3w9vybrh.js";import{wg as X}from"./chunk-8mzg29m4.js";import{Ag as O,Cg as w,Gj as W,Hg as A,Ig as N,Jg as U,Ug as V,eh as B}from"./chunk-cbjfw47x.js";import{Kk as M}from"./chunk-gd1x3rgn.js";var h=M(O(),1);function R(){let{projectId:k,collectionId:D}=P.useParams(),{teamId:G,ensureTeamIdForProject:H}=X();h.useEffect(()=>{H(k)},[k,H]);let{data:J}=N(Y(k)),{data:v,refetch:z}=A({...Z(D)}),{mutate:E}=U({mutationFn:async(q)=>{let K=await B.api.collections[":collectionId"].$patch({param:{collectionId:D},json:q});if(!K.ok)throw Error("Failed to update collection");return await K.json()},onSuccess:()=>{z()}}),b=J?.rootFolder,{data:L}=A({queryKey:["folders",b],queryFn:async()=>{let q=await B.api.folders[":folderId"].$get({param:{folderId:b}});if(!q.ok)throw Error("Failed to fetch folder");return await q.json()},enabled:!!b});if(!G||!b||!L||!v)return w("div",{children:W.loading_collection()});let $=v.filter.sourceFolderId||b;return w(_,{teamId:G,projectId:k,projectName:J.name??"",assetId:$,rootFolderId:b,collection:v,onUpdateCollection:E})}var P=V("/projects/$projectId/collections/$collectionId")({component:R});export{P as Route};
|
package/bin/chunk-24mag65w.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as v}from"./chunk-qxwfhv63.js";import"./chunk-2jv9re91.js";import"./chunk-v0cdg3n6.js";import"./chunk-sx1neqgr.js";import"./chunk-29203j0e.js";import"./chunk-6kv3jyfc.js";import"./chunk-d1zpcags.js";import"./chunk-s0g0bc6t.js";import"./chunk-s0k2r6ym.js";import"./chunk-fw5k0xrc.js";import"./chunk-8vc1m0kw.js";import"./chunk-nh4tzzn8.js";import"./chunk-21hvrvzj.js";import"./chunk-avvzqqk2.js";import"./chunk-4rz2105a.js";import"./chunk-f7fevgv2.js";import"./chunk-rek85wwv.js";import"./chunk-fgda7ncw.js";import"./chunk-8hq6sn31.js";import"./chunk-zj1rz1s9.js";import"./chunk-fnkrzqrn.js";import"./chunk-6vn44e4d.js";import"./chunk-f70xdh07.js";import"./chunk-qm9w9fcv.js";import"./chunk-n67rfv86.js";import"./chunk-54hmgj96.js";import"./chunk-7jkvjm4x.js";import"./chunk-r9s1zs4g.js";import"./chunk-3w9vybrh.js";import"./chunk-8mzg29m4.js";import{Cg as k,Ug as q}from"./chunk-cbjfw47x.js";import"./chunk-gd1x3rgn.js";function B(){let{shareId:w,folderId:A}=C.useParams();return k(v,{shareId:w,initialFolderId:A})}var C=q("/share/$shareId/folders/$folderId")({component:B});export{C as Route};
|