@marlinjai/studio-mcp 0.4.0 → 0.6.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.
Files changed (5) hide show
  1. package/README.md +45 -10
  2. package/dist/cli.js +1472 -1647
  3. package/dist/index.d.ts +66 -15
  4. package/dist/index.js +1472 -1647
  5. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -86,8 +86,8 @@ declare const DocNodeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
86
86
  video: "video";
87
87
  audio: "audio";
88
88
  text: "text";
89
- mesh3d: "mesh3d";
90
89
  json: "json";
90
+ mesh3d: "mesh3d";
91
91
  }>;
92
92
  required: z.ZodDefault<z.ZodBoolean>;
93
93
  cardinality: z.ZodOptional<z.ZodEnum<{
@@ -175,8 +175,8 @@ declare const WorkflowDocumentSchema: z.ZodObject<{
175
175
  video: "video";
176
176
  audio: "audio";
177
177
  text: "text";
178
- mesh3d: "mesh3d";
179
178
  json: "json";
179
+ mesh3d: "mesh3d";
180
180
  }>;
181
181
  required: z.ZodDefault<z.ZodBoolean>;
182
182
  cardinality: z.ZodOptional<z.ZodEnum<{
@@ -196,9 +196,9 @@ declare const WorkflowDocumentSchema: z.ZodObject<{
196
196
  video: "video";
197
197
  audio: "audio";
198
198
  text: "text";
199
+ json: "json";
199
200
  mask: "mask";
200
201
  mesh3d: "mesh3d";
201
- json: "json";
202
202
  }>;
203
203
  }, z.core.$strip>>;
204
204
  layout: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
@@ -232,6 +232,7 @@ declare const WorkflowDocumentSchema: z.ZodObject<{
232
232
  }, z.core.$strip>>;
233
233
  }, z.core.$strip>;
234
234
  type WorkflowDocument = z.infer<typeof WorkflowDocumentSchema>;
235
+
235
236
  declare const OpSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
236
237
  type: z.ZodLiteral<"addNode">;
237
238
  node: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -929,12 +930,41 @@ interface JobResponse {
929
930
  [k: string]: unknown;
930
931
  }>;
931
932
  }
933
+ /**
934
+ * How many images a job will really make for the count that was asked for.
935
+ * Mirrors `CandidatePlan` in the Studio's `src/lib/jobs/candidates.ts`.
936
+ */
937
+ interface CandidatePlan {
938
+ /** How many candidates the request asked for (one when it named none). */
939
+ requested: number;
940
+ /** How many images to expect. */
941
+ rendered: number;
942
+ /** For an automatic route whose fallback renders more: the most the job can render. */
943
+ mayRender?: number;
944
+ }
945
+ /** `POST /api/generate` for an image job. `candidates` and `notice` are absent
946
+ * from a Studio older than 2026-10-11; `notice` is present only when fewer
947
+ * images will be made than were asked for. */
948
+ interface GenerateImageResponse {
949
+ jobId: string;
950
+ kind: string;
951
+ candidates?: CandidatePlan;
952
+ notice?: string;
953
+ }
932
954
  interface CharacterSummary {
955
+ /** Unique within the key's company, not across companies. */
933
956
  slug: string;
934
957
  name: string;
935
958
  descriptorPrompt: string;
936
959
  negativePrompt?: string | null;
937
960
  defaultModel?: string | null;
961
+ /** True when the character's owner shared it with every company. */
962
+ shared?: boolean;
963
+ /**
964
+ * False for a character another company shared: usable in generations,
965
+ * never editable (uploads, edits and deletes answer 403).
966
+ */
967
+ owned?: boolean;
938
968
  }
939
969
  interface CharacterReference {
940
970
  id: string;
@@ -1057,14 +1087,29 @@ interface TenantUsageResponse {
1057
1087
  tenantId?: string;
1058
1088
  month: string;
1059
1089
  plan: string;
1060
- /** `null` = explicitly unlimited (only an operator-set plan can be). */
1090
+ /** `null` = no monthly cap: an operator-set unlimited plan, or a company on
1091
+ * prepaid credits, whose balance is the cap (see `credits`). Always null on
1092
+ * credits since 2026-10-11. */
1061
1093
  capUsd: number | null;
1094
+ /** A company on prepaid credits: its balance, its daily limit (null: none),
1095
+ * what left the balance today, and whether the Lumitra operator set a
1096
+ * monthly limit on top (`operatorMonthlyLimit`, absent from a Studio older
1097
+ * than 2026-10-11; its amount is not reported). Null for a company not on
1098
+ * credits; absent from a Studio older than 2026-10-10. */
1099
+ credits?: {
1100
+ balanceUsd: number;
1101
+ dailyLimitUsd: number | null;
1102
+ usedTodayUsd: number;
1103
+ dailyResetsAt: string;
1104
+ operatorMonthlyLimit?: boolean;
1105
+ } | null;
1062
1106
  /** `default`: no plan of its own, the default cap applies. `row`: an
1063
1107
  * operator-set plan. Absent from a Studio older than 2026-09-23. */
1064
1108
  capSource?: 'row' | 'default';
1065
1109
  rpm: number | null;
1066
- /** Realized + in-flight estimated: the same total the quota guard checks
1067
- * against and a 402 body's `usedUsd` reports. */
1110
+ /** Realized + in-flight estimated, in what the company paid: for a company
1111
+ * on prepaid credits what left and will leave its balance for the month's
1112
+ * jobs, otherwise the total the quota guard checks its cap against. */
1068
1113
  usedUsd: number;
1069
1114
  realizedUsd: number;
1070
1115
  inFlightEstimatedUsd: number;
@@ -1202,16 +1247,22 @@ declare class StudioClient {
1202
1247
  listProjects(): Promise<{
1203
1248
  projects: ProjectSummary[];
1204
1249
  }>;
1250
+ /**
1251
+ * One image job. `brandSlug` is optional: without it the image is generated
1252
+ * with no brand. A `brandSlug` or `characterSlug` the key's company cannot
1253
+ * use is refused with 404 `input_not_found` before anything is spent (since
1254
+ * 2026-10-11; it used to generate without the brand). `projectId` chooses the
1255
+ * project; without it the job lands in the project named after the brand, or
1256
+ * in `default`.
1257
+ */
1205
1258
  generate(body: {
1206
- brandSlug: string;
1259
+ brandSlug?: string;
1207
1260
  brandMode?: string;
1208
1261
  prompt: string;
1209
1262
  characterSlug?: string;
1263
+ projectId?: string;
1210
1264
  settings?: Record<string, unknown>;
1211
- }): Promise<{
1212
- jobId: string;
1213
- kind: string;
1214
- }>;
1265
+ }): Promise<GenerateImageResponse>;
1215
1266
  /**
1216
1267
  * One 3D generation. `/api/generate` routes to its 3D branch on `?force=3d`
1217
1268
  * (a prompt alone would be classified by its words); the model and its flags
@@ -1500,7 +1551,7 @@ declare function registerTools(server: McpServer, ctx: ToolContext): void;
1500
1551
  */
1501
1552
 
1502
1553
  declare const SERVER_NAME = "lumitra-studio";
1503
- declare const SERVER_VERSION = "0.4.0";
1554
+ declare const SERVER_VERSION = "0.6.0";
1504
1555
  interface CreateServerOptions {
1505
1556
  config?: StudioConfig;
1506
1557
  env?: NodeJS.ProcessEnv;
@@ -2220,8 +2271,8 @@ declare const studioWorkflowValidate: ToolDef<{
2220
2271
  video: "video";
2221
2272
  audio: "audio";
2222
2273
  text: "text";
2223
- mesh3d: "mesh3d";
2224
2274
  json: "json";
2275
+ mesh3d: "mesh3d";
2225
2276
  }>;
2226
2277
  required: z.ZodDefault<z.ZodBoolean>;
2227
2278
  cardinality: z.ZodOptional<z.ZodEnum<{
@@ -2241,9 +2292,9 @@ declare const studioWorkflowValidate: ToolDef<{
2241
2292
  video: "video";
2242
2293
  audio: "audio";
2243
2294
  text: "text";
2295
+ json: "json";
2244
2296
  mask: "mask";
2245
2297
  mesh3d: "mesh3d";
2246
- json: "json";
2247
2298
  }>;
2248
2299
  }, z.core.$strip>>;
2249
2300
  layout: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
@@ -2860,4 +2911,4 @@ declare function parseArgs(argv: string[]): CliArgs;
2860
2911
  declare function createHttpHandler(): (req: IncomingMessage, res: ServerResponse) => Promise<void>;
2861
2912
  declare function main(argv?: string[]): Promise<void>;
2862
2913
 
2863
- export { type AllTenantsUsageResponse, type Binding, CHARACTER_SHEET_DEFINITION, CHARACTER_SHEET_NODES, 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 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 };
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 };