@marlinjai/studio-mcp 0.6.0 → 0.8.0
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/README.md +17 -5
- package/dist/cli.js +952 -112
- package/dist/index.d.ts +490 -3
- package/dist/index.js +952 -112
- package/examples/cursor-mcp.json +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -867,6 +867,243 @@ interface ProjectionIssue {
|
|
|
867
867
|
message: string;
|
|
868
868
|
}
|
|
869
869
|
|
|
870
|
+
declare const CompositionDocumentSchema: z.ZodObject<{
|
|
871
|
+
schema: z.ZodLiteral<1>;
|
|
872
|
+
kind: z.ZodEnum<{
|
|
873
|
+
carousel: "carousel";
|
|
874
|
+
reel: "reel";
|
|
875
|
+
}>;
|
|
876
|
+
aspect: z.ZodEnum<{
|
|
877
|
+
"4:5": "4:5";
|
|
878
|
+
"1:1": "1:1";
|
|
879
|
+
"9:16": "9:16";
|
|
880
|
+
}>;
|
|
881
|
+
label: z.ZodString;
|
|
882
|
+
brandSlug: z.ZodString;
|
|
883
|
+
kitVersionAtEdit: z.ZodNumber;
|
|
884
|
+
items: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
885
|
+
id: z.ZodString;
|
|
886
|
+
type: z.ZodLiteral<"slide">;
|
|
887
|
+
background: z.ZodObject<{
|
|
888
|
+
assetId: z.ZodOptional<z.ZodString>;
|
|
889
|
+
fit: z.ZodEnum<{
|
|
890
|
+
cover: "cover";
|
|
891
|
+
contain: "contain";
|
|
892
|
+
}>;
|
|
893
|
+
focal: z.ZodObject<{
|
|
894
|
+
x: z.ZodNumber;
|
|
895
|
+
y: z.ZodNumber;
|
|
896
|
+
}, z.core.$strict>;
|
|
897
|
+
fill: z.ZodOptional<z.ZodString>;
|
|
898
|
+
}, z.core.$strict>;
|
|
899
|
+
overlays: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
900
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
901
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
902
|
+
id: z.ZodString;
|
|
903
|
+
type: z.ZodLiteral<"text">;
|
|
904
|
+
box: z.ZodObject<{
|
|
905
|
+
x: z.ZodNumber;
|
|
906
|
+
y: z.ZodNumber;
|
|
907
|
+
w: z.ZodNumber;
|
|
908
|
+
h: z.ZodNumber;
|
|
909
|
+
}, z.core.$strict>;
|
|
910
|
+
text: z.ZodString;
|
|
911
|
+
styleRole: z.ZodEnum<{
|
|
912
|
+
headline: "headline";
|
|
913
|
+
body: "body";
|
|
914
|
+
}>;
|
|
915
|
+
fontRole: z.ZodEnum<{
|
|
916
|
+
primary: "primary";
|
|
917
|
+
secondary: "secondary";
|
|
918
|
+
}>;
|
|
919
|
+
weight: z.ZodNumber;
|
|
920
|
+
italic: z.ZodBoolean;
|
|
921
|
+
colorRole: z.ZodString;
|
|
922
|
+
align: z.ZodEnum<{
|
|
923
|
+
left: "left";
|
|
924
|
+
center: "center";
|
|
925
|
+
right: "right";
|
|
926
|
+
}>;
|
|
927
|
+
background: z.ZodOptional<z.ZodObject<{
|
|
928
|
+
colorRole: z.ZodString;
|
|
929
|
+
opacity: z.ZodNumber;
|
|
930
|
+
padding: z.ZodNumber;
|
|
931
|
+
}, z.core.$strict>>;
|
|
932
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
933
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
934
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
935
|
+
id: z.ZodString;
|
|
936
|
+
type: z.ZodLiteral<"logo">;
|
|
937
|
+
box: z.ZodObject<{
|
|
938
|
+
x: z.ZodNumber;
|
|
939
|
+
y: z.ZodNumber;
|
|
940
|
+
w: z.ZodNumber;
|
|
941
|
+
h: z.ZodNumber;
|
|
942
|
+
}, z.core.$strict>;
|
|
943
|
+
variant: z.ZodEnum<{
|
|
944
|
+
light: "light";
|
|
945
|
+
dark: "dark";
|
|
946
|
+
}>;
|
|
947
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
948
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
949
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
950
|
+
id: z.ZodString;
|
|
951
|
+
type: z.ZodLiteral<"shape">;
|
|
952
|
+
box: z.ZodObject<{
|
|
953
|
+
x: z.ZodNumber;
|
|
954
|
+
y: z.ZodNumber;
|
|
955
|
+
w: z.ZodNumber;
|
|
956
|
+
h: z.ZodNumber;
|
|
957
|
+
}, z.core.$strict>;
|
|
958
|
+
shape: z.ZodEnum<{
|
|
959
|
+
rect: "rect";
|
|
960
|
+
pill: "pill";
|
|
961
|
+
}>;
|
|
962
|
+
colorRole: z.ZodString;
|
|
963
|
+
opacity: z.ZodNumber;
|
|
964
|
+
}, z.core.$strict>], "type">>;
|
|
965
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
966
|
+
id: z.ZodString;
|
|
967
|
+
type: z.ZodLiteral<"clip">;
|
|
968
|
+
assetId: z.ZodString;
|
|
969
|
+
trimIn: z.ZodNumber;
|
|
970
|
+
trimOut: z.ZodNumber;
|
|
971
|
+
overlays: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
972
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
973
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
974
|
+
id: z.ZodString;
|
|
975
|
+
type: z.ZodLiteral<"text">;
|
|
976
|
+
box: z.ZodObject<{
|
|
977
|
+
x: z.ZodNumber;
|
|
978
|
+
y: z.ZodNumber;
|
|
979
|
+
w: z.ZodNumber;
|
|
980
|
+
h: z.ZodNumber;
|
|
981
|
+
}, z.core.$strict>;
|
|
982
|
+
text: z.ZodString;
|
|
983
|
+
styleRole: z.ZodEnum<{
|
|
984
|
+
headline: "headline";
|
|
985
|
+
body: "body";
|
|
986
|
+
}>;
|
|
987
|
+
fontRole: z.ZodEnum<{
|
|
988
|
+
primary: "primary";
|
|
989
|
+
secondary: "secondary";
|
|
990
|
+
}>;
|
|
991
|
+
weight: z.ZodNumber;
|
|
992
|
+
italic: z.ZodBoolean;
|
|
993
|
+
colorRole: z.ZodString;
|
|
994
|
+
align: z.ZodEnum<{
|
|
995
|
+
left: "left";
|
|
996
|
+
center: "center";
|
|
997
|
+
right: "right";
|
|
998
|
+
}>;
|
|
999
|
+
background: z.ZodOptional<z.ZodObject<{
|
|
1000
|
+
colorRole: z.ZodString;
|
|
1001
|
+
opacity: z.ZodNumber;
|
|
1002
|
+
padding: z.ZodNumber;
|
|
1003
|
+
}, z.core.$strict>>;
|
|
1004
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1005
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
1006
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
1007
|
+
id: z.ZodString;
|
|
1008
|
+
type: z.ZodLiteral<"logo">;
|
|
1009
|
+
box: z.ZodObject<{
|
|
1010
|
+
x: z.ZodNumber;
|
|
1011
|
+
y: z.ZodNumber;
|
|
1012
|
+
w: z.ZodNumber;
|
|
1013
|
+
h: z.ZodNumber;
|
|
1014
|
+
}, z.core.$strict>;
|
|
1015
|
+
variant: z.ZodEnum<{
|
|
1016
|
+
light: "light";
|
|
1017
|
+
dark: "dark";
|
|
1018
|
+
}>;
|
|
1019
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1020
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
1021
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
1022
|
+
id: z.ZodString;
|
|
1023
|
+
type: z.ZodLiteral<"shape">;
|
|
1024
|
+
box: z.ZodObject<{
|
|
1025
|
+
x: z.ZodNumber;
|
|
1026
|
+
y: z.ZodNumber;
|
|
1027
|
+
w: z.ZodNumber;
|
|
1028
|
+
h: z.ZodNumber;
|
|
1029
|
+
}, z.core.$strict>;
|
|
1030
|
+
shape: z.ZodEnum<{
|
|
1031
|
+
rect: "rect";
|
|
1032
|
+
pill: "pill";
|
|
1033
|
+
}>;
|
|
1034
|
+
colorRole: z.ZodString;
|
|
1035
|
+
opacity: z.ZodNumber;
|
|
1036
|
+
}, z.core.$strict>], "type">>;
|
|
1037
|
+
}, z.core.$strict>]>>;
|
|
1038
|
+
reelOverlays: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1039
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
1040
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
1041
|
+
id: z.ZodString;
|
|
1042
|
+
type: z.ZodLiteral<"text">;
|
|
1043
|
+
box: z.ZodObject<{
|
|
1044
|
+
x: z.ZodNumber;
|
|
1045
|
+
y: z.ZodNumber;
|
|
1046
|
+
w: z.ZodNumber;
|
|
1047
|
+
h: z.ZodNumber;
|
|
1048
|
+
}, z.core.$strict>;
|
|
1049
|
+
text: z.ZodString;
|
|
1050
|
+
styleRole: z.ZodEnum<{
|
|
1051
|
+
headline: "headline";
|
|
1052
|
+
body: "body";
|
|
1053
|
+
}>;
|
|
1054
|
+
fontRole: z.ZodEnum<{
|
|
1055
|
+
primary: "primary";
|
|
1056
|
+
secondary: "secondary";
|
|
1057
|
+
}>;
|
|
1058
|
+
weight: z.ZodNumber;
|
|
1059
|
+
italic: z.ZodBoolean;
|
|
1060
|
+
colorRole: z.ZodString;
|
|
1061
|
+
align: z.ZodEnum<{
|
|
1062
|
+
left: "left";
|
|
1063
|
+
center: "center";
|
|
1064
|
+
right: "right";
|
|
1065
|
+
}>;
|
|
1066
|
+
background: z.ZodOptional<z.ZodObject<{
|
|
1067
|
+
colorRole: z.ZodString;
|
|
1068
|
+
opacity: z.ZodNumber;
|
|
1069
|
+
padding: z.ZodNumber;
|
|
1070
|
+
}, z.core.$strict>>;
|
|
1071
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1072
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
1073
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
1074
|
+
id: z.ZodString;
|
|
1075
|
+
type: z.ZodLiteral<"logo">;
|
|
1076
|
+
box: z.ZodObject<{
|
|
1077
|
+
x: z.ZodNumber;
|
|
1078
|
+
y: z.ZodNumber;
|
|
1079
|
+
w: z.ZodNumber;
|
|
1080
|
+
h: z.ZodNumber;
|
|
1081
|
+
}, z.core.$strict>;
|
|
1082
|
+
variant: z.ZodEnum<{
|
|
1083
|
+
light: "light";
|
|
1084
|
+
dark: "dark";
|
|
1085
|
+
}>;
|
|
1086
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1087
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
1088
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
1089
|
+
id: z.ZodString;
|
|
1090
|
+
type: z.ZodLiteral<"shape">;
|
|
1091
|
+
box: z.ZodObject<{
|
|
1092
|
+
x: z.ZodNumber;
|
|
1093
|
+
y: z.ZodNumber;
|
|
1094
|
+
w: z.ZodNumber;
|
|
1095
|
+
h: z.ZodNumber;
|
|
1096
|
+
}, z.core.$strict>;
|
|
1097
|
+
shape: z.ZodEnum<{
|
|
1098
|
+
rect: "rect";
|
|
1099
|
+
pill: "pill";
|
|
1100
|
+
}>;
|
|
1101
|
+
colorRole: z.ZodString;
|
|
1102
|
+
opacity: z.ZodNumber;
|
|
1103
|
+
}, z.core.$strict>], "type">>;
|
|
1104
|
+
}, z.core.$strict>;
|
|
1105
|
+
type CompositionDocument = z.infer<typeof CompositionDocumentSchema>;
|
|
1106
|
+
|
|
870
1107
|
/**
|
|
871
1108
|
* Server configuration, resolved from the environment once at startup.
|
|
872
1109
|
*
|
|
@@ -907,7 +1144,122 @@ interface ProjectSummary {
|
|
|
907
1144
|
slug: string;
|
|
908
1145
|
name: string;
|
|
909
1146
|
}
|
|
1147
|
+
/** `GET /api/v1/projects/:id`: the project and what deleting it would remove. */
|
|
1148
|
+
interface ProjectContents {
|
|
1149
|
+
project: ProjectSummary & {
|
|
1150
|
+
isDefault: boolean;
|
|
1151
|
+
};
|
|
1152
|
+
workflows: number;
|
|
1153
|
+
publishedWorkflows: number;
|
|
1154
|
+
runs: number;
|
|
1155
|
+
assets: number;
|
|
1156
|
+
chats: number;
|
|
1157
|
+
campaignShots: number;
|
|
1158
|
+
campaigns: number;
|
|
1159
|
+
jobsInFlight: number;
|
|
1160
|
+
runsInFlight: number;
|
|
1161
|
+
}
|
|
1162
|
+
/** One row of `GET /api/v1/workflows`. */
|
|
1163
|
+
interface SavedWorkflowListing {
|
|
1164
|
+
savedId: string;
|
|
1165
|
+
label: string;
|
|
1166
|
+
version?: number;
|
|
1167
|
+
[key: string]: unknown;
|
|
1168
|
+
}
|
|
1169
|
+
/** One row of `GET /api/campaigns`. */
|
|
1170
|
+
interface CampaignListing {
|
|
1171
|
+
id: string;
|
|
1172
|
+
name: string;
|
|
1173
|
+
studioId: string;
|
|
1174
|
+
shotCount: number | null;
|
|
1175
|
+
createdAt: string;
|
|
1176
|
+
}
|
|
1177
|
+
/** `GET /api/campaigns/:id`: the campaign and what deleting it would remove or keep. */
|
|
1178
|
+
interface CampaignContents {
|
|
1179
|
+
id: string;
|
|
1180
|
+
name: string;
|
|
1181
|
+
createdAt: string;
|
|
1182
|
+
shots: number;
|
|
1183
|
+
imagesKept: number;
|
|
1184
|
+
shotsRendering: number;
|
|
1185
|
+
}
|
|
910
1186
|
type JobStatus = 'queued' | 'running' | 'succeeded' | 'failed' | 'canceled' | (string & {});
|
|
1187
|
+
/** `GET /api/brands/[slug]/kit` (file URLs are Studio-relative and not used by the tools). */
|
|
1188
|
+
interface BrandKitResponse {
|
|
1189
|
+
version: number;
|
|
1190
|
+
colors: {
|
|
1191
|
+
id: string;
|
|
1192
|
+
name: string;
|
|
1193
|
+
hex: string;
|
|
1194
|
+
}[];
|
|
1195
|
+
typeRoles: {
|
|
1196
|
+
headline: {
|
|
1197
|
+
px: number;
|
|
1198
|
+
};
|
|
1199
|
+
body: {
|
|
1200
|
+
px: number;
|
|
1201
|
+
};
|
|
1202
|
+
};
|
|
1203
|
+
fonts: {
|
|
1204
|
+
role: 'primary' | 'secondary';
|
|
1205
|
+
family: string;
|
|
1206
|
+
source: string;
|
|
1207
|
+
files: {
|
|
1208
|
+
weight: number;
|
|
1209
|
+
style: 'normal' | 'italic';
|
|
1210
|
+
}[];
|
|
1211
|
+
}[];
|
|
1212
|
+
logos: {
|
|
1213
|
+
variant: 'light' | 'dark';
|
|
1214
|
+
width: number;
|
|
1215
|
+
height: number;
|
|
1216
|
+
}[];
|
|
1217
|
+
}
|
|
1218
|
+
interface CompositionSummary {
|
|
1219
|
+
id: string;
|
|
1220
|
+
projectId: string;
|
|
1221
|
+
kind: 'carousel' | 'reel';
|
|
1222
|
+
label: string;
|
|
1223
|
+
brandSlug: string;
|
|
1224
|
+
revision: number;
|
|
1225
|
+
updatedAt: string;
|
|
1226
|
+
}
|
|
1227
|
+
/** One asset of a project as `GET /api/v1/projects/[id]/assets` returns it (signed `url`). */
|
|
1228
|
+
interface ProjectAsset {
|
|
1229
|
+
id: string;
|
|
1230
|
+
projectId: string;
|
|
1231
|
+
subtype: string;
|
|
1232
|
+
url: string | null;
|
|
1233
|
+
thumbUrl?: string | null;
|
|
1234
|
+
mimeType: string | null;
|
|
1235
|
+
prompt: string | null;
|
|
1236
|
+
metadata: Record<string, unknown>;
|
|
1237
|
+
createdAt: string;
|
|
1238
|
+
}
|
|
1239
|
+
/** A Lumitra Social project as `GET /api/v1/social/projects` lists it. */
|
|
1240
|
+
interface SocialProjectSummary {
|
|
1241
|
+
id: string;
|
|
1242
|
+
slug: string;
|
|
1243
|
+
name: string;
|
|
1244
|
+
igHandle?: string | null;
|
|
1245
|
+
defaultLanguage?: string;
|
|
1246
|
+
}
|
|
1247
|
+
/** One send of a post to Lumitra Social. */
|
|
1248
|
+
interface SocialSendView {
|
|
1249
|
+
id: string;
|
|
1250
|
+
status: 'sending' | 'sent' | 'failed';
|
|
1251
|
+
format: string;
|
|
1252
|
+
projectSlug: string;
|
|
1253
|
+
scheduledAt: string | null;
|
|
1254
|
+
postId: string | null;
|
|
1255
|
+
plannerUrl: string;
|
|
1256
|
+
errorCode: string | null;
|
|
1257
|
+
errorMessage: string | null;
|
|
1258
|
+
createdAt: string;
|
|
1259
|
+
}
|
|
1260
|
+
interface CompositionRecord extends CompositionSummary {
|
|
1261
|
+
document: CompositionDocument;
|
|
1262
|
+
}
|
|
911
1263
|
interface JobResponse {
|
|
912
1264
|
job: {
|
|
913
1265
|
id: string;
|
|
@@ -1247,6 +1599,48 @@ declare class StudioClient {
|
|
|
1247
1599
|
listProjects(): Promise<{
|
|
1248
1600
|
projects: ProjectSummary[];
|
|
1249
1601
|
}>;
|
|
1602
|
+
createProject(name: string): Promise<{
|
|
1603
|
+
project: ProjectSummary & {
|
|
1604
|
+
isDefault: boolean;
|
|
1605
|
+
};
|
|
1606
|
+
}>;
|
|
1607
|
+
renameProject(projectId: string, name: string): Promise<{
|
|
1608
|
+
project: ProjectSummary & {
|
|
1609
|
+
isDefault: boolean;
|
|
1610
|
+
};
|
|
1611
|
+
}>;
|
|
1612
|
+
/** What a project holds, which is what deleting it would remove. */
|
|
1613
|
+
describeProject(projectId: string): Promise<ProjectContents>;
|
|
1614
|
+
deleteProject(projectId: string): Promise<{
|
|
1615
|
+
deleted: true;
|
|
1616
|
+
project: ProjectSummary;
|
|
1617
|
+
fallbackProjectId: string;
|
|
1618
|
+
}>;
|
|
1619
|
+
listWorkflows(opts?: {
|
|
1620
|
+
projectId?: string;
|
|
1621
|
+
}): Promise<{
|
|
1622
|
+
workflows: SavedWorkflowListing[];
|
|
1623
|
+
}>;
|
|
1624
|
+
moveWorkflow(savedId: string, body: {
|
|
1625
|
+
toProjectId: string;
|
|
1626
|
+
projectId?: string;
|
|
1627
|
+
}): Promise<{
|
|
1628
|
+
moved: true;
|
|
1629
|
+
savedId: string;
|
|
1630
|
+
projectId: string;
|
|
1631
|
+
runsMoved: number;
|
|
1632
|
+
assetsMoved: number;
|
|
1633
|
+
}>;
|
|
1634
|
+
listCampaigns(): Promise<{
|
|
1635
|
+
campaigns: CampaignListing[];
|
|
1636
|
+
}>;
|
|
1637
|
+
/** The campaign and what deleting it would remove or keep. */
|
|
1638
|
+
describeCampaign(campaignId: string): Promise<CampaignContents>;
|
|
1639
|
+
deleteCampaign(campaignId: string): Promise<{
|
|
1640
|
+
deleted: true;
|
|
1641
|
+
id: string;
|
|
1642
|
+
shotsDeleted: number;
|
|
1643
|
+
}>;
|
|
1250
1644
|
/**
|
|
1251
1645
|
* One image job. `brandSlug` is optional: without it the image is generated
|
|
1252
1646
|
* with no brand. A `brandSlug` or `characterSlug` the key's company cannot
|
|
@@ -1347,6 +1741,9 @@ declare class StudioClient {
|
|
|
1347
1741
|
budgetUsd?: number;
|
|
1348
1742
|
/** S6b: bypasses a per-key confirmation threshold for this one request. */
|
|
1349
1743
|
confirm?: boolean;
|
|
1744
|
+
/** Runs despite the continuity check of a clip with a start and an end
|
|
1745
|
+
* frame (400 `continuity_mismatch` / `continuity_unchecked` otherwise). */
|
|
1746
|
+
acknowledgeContinuity?: boolean;
|
|
1350
1747
|
}): Promise<RunStartResponse>;
|
|
1351
1748
|
getRun(runId: string): Promise<RunResponse>;
|
|
1352
1749
|
/** Submit a human decision on a parked judge node (P3 J2). Approving
|
|
@@ -1409,6 +1806,8 @@ declare class StudioClient {
|
|
|
1409
1806
|
* creates a character (422 `likeness_rights_confirmation_required`,
|
|
1410
1807
|
* before anything is spent); ignored by a recipe that creates none. */
|
|
1411
1808
|
likenessRightsConfirmed?: true;
|
|
1809
|
+
/** Runs despite the continuity check, as on runWorkflow. */
|
|
1810
|
+
acknowledgeContinuity?: boolean;
|
|
1412
1811
|
}): Promise<{
|
|
1413
1812
|
runId: string;
|
|
1414
1813
|
status: string;
|
|
@@ -1441,6 +1840,70 @@ declare class StudioClient {
|
|
|
1441
1840
|
acknowledgeLossy?: boolean;
|
|
1442
1841
|
projectId?: string;
|
|
1443
1842
|
}): Promise<WorkflowApplyResponse>;
|
|
1843
|
+
/** A brand's kit: colours, the two type sizes, fonts by role, logos by variant, version. */
|
|
1844
|
+
getBrandKit(brandSlug: string): Promise<{
|
|
1845
|
+
kit: BrandKitResponse;
|
|
1846
|
+
}>;
|
|
1847
|
+
listCompositions(opts?: {
|
|
1848
|
+
projectId?: string;
|
|
1849
|
+
}): Promise<{
|
|
1850
|
+
compositions: CompositionSummary[];
|
|
1851
|
+
}>;
|
|
1852
|
+
/** 201 created; 200 with `replayed: true` when a create with this idempotencyKey already made it. */
|
|
1853
|
+
createComposition(body: {
|
|
1854
|
+
kind: 'carousel' | 'reel';
|
|
1855
|
+
brandSlug: string;
|
|
1856
|
+
projectId?: string;
|
|
1857
|
+
aspect?: string;
|
|
1858
|
+
label?: string;
|
|
1859
|
+
ops?: unknown[];
|
|
1860
|
+
idempotencyKey?: string;
|
|
1861
|
+
}): Promise<{
|
|
1862
|
+
composition: CompositionRecord;
|
|
1863
|
+
replayed?: boolean;
|
|
1864
|
+
}>;
|
|
1865
|
+
/** A project's assets, newest first, optionally of one subtype (Image, Video, CarouselSlide, Reel, ...). */
|
|
1866
|
+
listProjectAssets(projectId: string, opts?: {
|
|
1867
|
+
subtype?: string;
|
|
1868
|
+
limit?: number;
|
|
1869
|
+
}): Promise<{
|
|
1870
|
+
assets: ProjectAsset[];
|
|
1871
|
+
}>;
|
|
1872
|
+
getComposition(compositionId: string): Promise<{
|
|
1873
|
+
composition: CompositionRecord;
|
|
1874
|
+
}>;
|
|
1875
|
+
/** 409 stale_revision (with the current composition) or idempotency_mismatch; 422 invalid_patch. */
|
|
1876
|
+
patchComposition(compositionId: string, patch: {
|
|
1877
|
+
baseRevision: number;
|
|
1878
|
+
ops: unknown[];
|
|
1879
|
+
idempotencyKey: string;
|
|
1880
|
+
}): Promise<{
|
|
1881
|
+
composition: CompositionRecord;
|
|
1882
|
+
applied: unknown[];
|
|
1883
|
+
inverse: unknown[];
|
|
1884
|
+
replayed: boolean;
|
|
1885
|
+
}>;
|
|
1886
|
+
/** The company's Lumitra Social projects (409 not_connected / link_broken until an owner connects it in Studio). */
|
|
1887
|
+
listSocialProjects(brandSlug?: string): Promise<{
|
|
1888
|
+
projects: SocialProjectSummary[];
|
|
1889
|
+
lastProjectSlug: string | null;
|
|
1890
|
+
}>;
|
|
1891
|
+
/** Send the rendered post to Lumitra Social; idempotent on `idempotencyKey`. */
|
|
1892
|
+
sendCompositionToSocial(compositionId: string, body: {
|
|
1893
|
+
projectSlug: string;
|
|
1894
|
+
caption?: string;
|
|
1895
|
+
hashtags?: string;
|
|
1896
|
+
scheduledAt?: string | null;
|
|
1897
|
+
idempotencyKey: string;
|
|
1898
|
+
}): Promise<{
|
|
1899
|
+
send: SocialSendView;
|
|
1900
|
+
replayed: boolean;
|
|
1901
|
+
}>;
|
|
1902
|
+
/** Start (or join) a render. 422 not_ready with `reasons`; 429 render_limit or render_busy (a reel of this company is rendering). */
|
|
1903
|
+
renderComposition(compositionId: string): Promise<{
|
|
1904
|
+
jobId: string;
|
|
1905
|
+
reused: boolean;
|
|
1906
|
+
}>;
|
|
1444
1907
|
/** Stateless dry-run of ops and run params against a document. No side effects. */
|
|
1445
1908
|
validateWorkflow(body: {
|
|
1446
1909
|
document: WorkflowDocument;
|
|
@@ -1493,6 +1956,22 @@ declare function pollUntil<T>(what: string, fetchState: () => Promise<T>, isDone
|
|
|
1493
1956
|
declare function waitForJob(client: StudioClient, jobId: string, opts?: PollOptions): Promise<JobResponse>;
|
|
1494
1957
|
declare function waitForRun(client: StudioClient, runId: string, opts?: PollOptions): Promise<RunResponse>;
|
|
1495
1958
|
|
|
1959
|
+
/** What a confirmation ended in. `unavailable`: the client cannot ask the person. */
|
|
1960
|
+
type ConfirmOutcome = 'confirmed' | 'declined' | 'unavailable';
|
|
1961
|
+
type ConfirmFn = (message: string) => Promise<ConfirmOutcome>;
|
|
1962
|
+
/**
|
|
1963
|
+
* One-time confirmation tokens for clients without elicitation. A token names
|
|
1964
|
+
* the exact `subject` the person was shown (the action, the target and a
|
|
1965
|
+
* fingerprint of its contents), so it cannot be spent on anything else.
|
|
1966
|
+
*/
|
|
1967
|
+
declare class ConfirmationStore {
|
|
1968
|
+
#private;
|
|
1969
|
+
constructor(now?: () => number);
|
|
1970
|
+
issue(subject: string): string;
|
|
1971
|
+
/** True once for a live token issued for exactly this subject; the token is spent either way. */
|
|
1972
|
+
redeem(token: string, subject: string): boolean;
|
|
1973
|
+
}
|
|
1974
|
+
|
|
1496
1975
|
/**
|
|
1497
1976
|
* The shape of one tool in the catalog, shared by `tools.ts` (the recipe and
|
|
1498
1977
|
* entity tools) and `workflowTools.ts` (the workflow command-model primitives)
|
|
@@ -1503,6 +1982,14 @@ interface ToolContext {
|
|
|
1503
1982
|
client: StudioClient;
|
|
1504
1983
|
/** Poll tuning (tests inject a zero-delay sleep). */
|
|
1505
1984
|
poll?: Omit<PollOptions, 'timeoutMs'>;
|
|
1985
|
+
/**
|
|
1986
|
+
* Ask the PERSON to confirm a destructive action in the chat (Model Context
|
|
1987
|
+
* Protocol elicitation). `registerTools` wires it to the connected client;
|
|
1988
|
+
* resolves `unavailable` when the client cannot show the dialog.
|
|
1989
|
+
*/
|
|
1990
|
+
confirm?: ConfirmFn;
|
|
1991
|
+
/** One-time confirmation tokens, the fallback for a client without elicitation. */
|
|
1992
|
+
confirmations?: ConfirmationStore;
|
|
1506
1993
|
}
|
|
1507
1994
|
interface ToolDef<Shape extends z.ZodRawShape = z.ZodRawShape> {
|
|
1508
1995
|
name: string;
|
|
@@ -1543,7 +2030,7 @@ type ToolResult = {
|
|
|
1543
2030
|
* an MCP tool error whose text is the API's own message, redacted of the key.
|
|
1544
2031
|
*/
|
|
1545
2032
|
declare function invokeTool<Shape extends z.ZodRawShape>(def: ToolDef<Shape>, args: unknown, ctx: ToolContext): Promise<ToolResult>;
|
|
1546
|
-
declare function registerTools(server: McpServer,
|
|
2033
|
+
declare function registerTools(server: McpServer, base: ToolContext): void;
|
|
1547
2034
|
|
|
1548
2035
|
/**
|
|
1549
2036
|
* Build an McpServer with the Studio tool catalog registered. Transport-agnostic:
|
|
@@ -1551,7 +2038,7 @@ declare function registerTools(server: McpServer, ctx: ToolContext): void;
|
|
|
1551
2038
|
*/
|
|
1552
2039
|
|
|
1553
2040
|
declare const SERVER_NAME = "lumitra-studio";
|
|
1554
|
-
declare const SERVER_VERSION = "0.
|
|
2041
|
+
declare const SERVER_VERSION = "0.8.0";
|
|
1555
2042
|
interface CreateServerOptions {
|
|
1556
2043
|
config?: StudioConfig;
|
|
1557
2044
|
env?: NodeJS.ProcessEnv;
|
|
@@ -2911,4 +3398,4 @@ declare function parseArgs(argv: string[]): CliArgs;
|
|
|
2911
3398
|
declare function createHttpHandler(): (req: IncomingMessage, res: ServerResponse) => Promise<void>;
|
|
2912
3399
|
declare function main(argv?: string[]): Promise<void>;
|
|
2913
3400
|
|
|
2914
|
-
export { type AllTenantsUsageResponse, type Binding, CHARACTER_SHEET_DEFINITION, CHARACTER_SHEET_NODES, type CandidatePlan, type CharacterReference, type CharacterSummary, type CharacterSwapInput, ConfigError, ContractError, type CreateServerOptions, DEFAULT_BASE_URL, DEFAULT_MOTION_PROMPT, DEFAULT_SWAP_EDIT_MODEL, DEFAULT_SWAP_PROMPT, DEFAULT_SWAP_VIDEO_MODEL, DEFAULT_TIMEOUT_MS, type DocumentSummary, type FetchLike, type GenerateImageResponse, type JobResponse, type JobStatus, type JudgeCandidate, MINT_REFERENCE_CATEGORIES, type NodeResultResponse, type NodeRun, type NodeStatus, type NodeSummary, type NodeTypesResponse, type PollOptions, PollTimeoutError, type ProjectSummary, type Projection, type RemovedNode, type RunResponse, type RunStartResponse, type RunStatus, SERVER_NAME, SERVER_VERSION, SUMMARY_TEXT_CHARS, SWAP_SCOPES, type SpendLedger, StudioApiError, StudioClient, type StudioClientOptions, type StudioConfig, type StudioMcp, type SummaryMeta, type SwapPromptOptions, type SwapScope, TOOLS, TOOL_NAMES, type TaskDescriptor, type TenantSpendSummary, type TenantUsageResponse, type ToolContext, type ToolDef, ToolInputError, type ToolResult, type TurnaroundView, type UploadFile, type UsageByModel, type UsageResponse, WORKFLOW_TOOLS, type WorkflowApplyResponse, type WorkflowCreateResponse, type WorkflowDefinition, type WorkflowDocumentResponse, type WorkflowNode, type WorkflowValidateResponse, affectedNodes, buildCharacterSheetParams, buildCharacterSwapDefinition, categoryForNode, characterSheetDefinition, composeSwapPrompt, createHttpHandler, createStudioMcpServer, extensionForMime, filenameFromUrl, invokeTool, main, mimeForFilename, parseArgs, parseDocument, parseOps, pollUntil, projectionOf, redactSecret, registerTools, resolveConfig, seedFacePrompt, studioWorkflowApply, studioWorkflowCreate, studioWorkflowDescribe, studioWorkflowGet, studioWorkflowScreenshot, studioWorkflowValidate, summarizeDocument, summarizeNode, touchedNodeIds, turnaroundViewPrompt, waitForJob, waitForRun };
|
|
3401
|
+
export { type AllTenantsUsageResponse, type Binding, type BrandKitResponse, CHARACTER_SHEET_DEFINITION, CHARACTER_SHEET_NODES, type CampaignContents, type CampaignListing, type CandidatePlan, type CharacterReference, type CharacterSummary, type CharacterSwapInput, type CompositionRecord, type CompositionSummary, ConfigError, ContractError, type CreateServerOptions, DEFAULT_BASE_URL, DEFAULT_MOTION_PROMPT, DEFAULT_SWAP_EDIT_MODEL, DEFAULT_SWAP_PROMPT, DEFAULT_SWAP_VIDEO_MODEL, DEFAULT_TIMEOUT_MS, type DocumentSummary, type FetchLike, type GenerateImageResponse, type JobResponse, type JobStatus, type JudgeCandidate, MINT_REFERENCE_CATEGORIES, type NodeResultResponse, type NodeRun, type NodeStatus, type NodeSummary, type NodeTypesResponse, type PollOptions, PollTimeoutError, type ProjectAsset, type ProjectContents, type ProjectSummary, type Projection, type RemovedNode, type RunResponse, type RunStartResponse, type RunStatus, SERVER_NAME, SERVER_VERSION, SUMMARY_TEXT_CHARS, SWAP_SCOPES, type SavedWorkflowListing, type SocialProjectSummary, type SocialSendView, type SpendLedger, StudioApiError, StudioClient, type StudioClientOptions, type StudioConfig, type StudioMcp, type SummaryMeta, type SwapPromptOptions, type SwapScope, TOOLS, TOOL_NAMES, type TaskDescriptor, type TenantSpendSummary, type TenantUsageResponse, type ToolContext, type ToolDef, ToolInputError, type ToolResult, type TurnaroundView, type UploadFile, type UsageByModel, type UsageResponse, WORKFLOW_TOOLS, type WorkflowApplyResponse, type WorkflowCreateResponse, type WorkflowDefinition, type WorkflowDocumentResponse, type WorkflowNode, type WorkflowValidateResponse, affectedNodes, buildCharacterSheetParams, buildCharacterSwapDefinition, categoryForNode, characterSheetDefinition, composeSwapPrompt, createHttpHandler, createStudioMcpServer, extensionForMime, filenameFromUrl, invokeTool, main, mimeForFilename, parseArgs, parseDocument, parseOps, pollUntil, projectionOf, redactSecret, registerTools, resolveConfig, seedFacePrompt, studioWorkflowApply, studioWorkflowCreate, studioWorkflowDescribe, studioWorkflowGet, studioWorkflowScreenshot, studioWorkflowValidate, summarizeDocument, summarizeNode, touchedNodeIds, turnaroundViewPrompt, waitForJob, waitForRun };
|